Automating licensing for Office 365 in a hybrid environment