Office 365 License Assignment to Specific Group RRS feed

  • Question

  • We have a Group (All users) in our on premises AD which is Synced with Azure AD. We want to give License to only those users which are in this group. So is there a way or recommendations or any PowerShell script with which we could perform this activity?

    Thanks in advance...!!

    Monday, November 7, 2016 6:28 PM

All replies

  • This link has a pre-built function to do it.

    From: you can also assign an -ObjectID <Guid>. Could potentially use that.

    get-adgroup "All Users" | select-object ObjectGUID

    Set-MsolUserLicense -ObjectId <Guid> [-AddLicenses <string[]>] [-LicenseOptions <LicenseOption[]>] [-RemoveLicenses <string[]>] [-TenantId <Guid>] [<CommonParameters>]

    *Please confirm what the function does before running it in your environment.

    Thanks, Tim.

    Tuesday, November 8, 2016 10:56 AM