There are couple of different ways to automate licencing for Office 365. The most simple way is a federated authorisation network which you can setup via a cloyd sync with Office 365. In short, you get a Siingle Sign On solution where users never have to go login twice or go through the setup wizard again. Check out this page, might be useful www.iamcloud.com