Blog Post

Microsoft Entra Blog
3 MIN READ

Migrate your apps to access the license managements APIs from Microsoft Graph

Alex_Simons's avatar
Alex_Simons
Icon for Microsoft rankMicrosoft
Aug 26, 2021

Update 7/29/2022: We have updated the retirement date of the Azure AD Graph and MSOnline PowerShell licensing assignment APIs and PowerShell cmdlets for existing tenants to March 31, 2023. APIs and Cmdlets will not work for new tenants created after November 1, 2022. Customers may notice performance delays as we approach the retirement deadline, so we recommend prioritizing migration to MS Graph following the guidance below and in Find Azure AD and MSOnline cmdlets in Microsoft Graph PowerShell | Microsoft Docs.

 

Update 6/23/2022: Please note that adoption of the new platform is not available for Q1 2022. Customers will be able to opt in to use the new licensing platform and its functionality at a future, to-be-determined date. We will provide another update at the end of CY2022.

 

Update 5/19/2022: We have changed the retirement date of the Azure AD Graph and MSOnline PowerShell licensing assignment APIs and PowerShell cmdlet. Going forward, we are centralizing our change announcements. For up-to-date information, please refer to change management blog posts: Azure AD: Change Management Simplified - Microsoft Tech Community.

 

 

Howdy folks!

 

In June, I reminded you to update your apps to use Microsoft Graph due to the end of support for Azure Active Directory (Azure AD) Graph on June 30, 2022. Apps using Azure AD Graph after this time will no longer receive responses from the Azure AD Graph endpoint.  

 

Retiring license assignment APIs

Since the Azure AD Graph APIs are being retired, we are also retiring the license assignment operation in the MSOnline and Azure AD PowerShell modules. We recommend that you update existing applications to access the license assignment APIs from the Microsoft Graph endpoint and update your scripts to use the Microsoft Graph PowerShell module to reduce the impact on operations. Other operations in the MSOnline and Azure AD PowerShell modules won’t be impacted.

 

Below are some of the operations that will no longer receive a successful response beginning on June 30, 2022.

 

Existing operation (will no longer receive a successful response)

Microsoft Graph equivalent to use going forward

MSOnline PowerShell

·       Set-MsolUserLicense

·       New-MsolUser (where -LicenseAssignment or -LicenseOptions is provided)

Microsoft Graph PowerShell

·       Set-MgUserLicense

Azure AD PowerShell

·       Set-AzureADUserLicense

Azure AD Graph API (graph.windows.net)

·       assignLicense

Microsoft Graph API

·       assignLicense

 

 

What’s next: new license management platform

The current license management features have grown to address the needs of our customers, with key innovations like group-based licensing. But as the needs of our customers have evolved, we decided to rebuild the online services licensing platform from the ground up. Below is an early look into future changes to the platform, designed with four key goals in mind:

  • Flexibility: Expanding beyond a single administration structure, single megalithic pool of seats, or even a single tenant.
  • Simplicity: Reducing unnecessary complexity and simplify getting your licenses to your end users.
  • Speed: Gaining quick access to what you’ve purchased.
  • Accuracy: Reflecting what you have purchased and the licenses you have available to assign.

 

Realizing the entire vision will take time, but today we are sharing the first milestone in this journey. Starting in the first quarter of 2022, customers can opt-in to use the new license management platform. Here are the features you will see as part of this milestone:

  • Allotments will help you separate your licenses into smaller batches so you can set limits on how many licenses are used, and delegate ownership to manage them.
  • Group licensing will be extended. In the new licensing platform, Azure AD Premium or Office 365 E3 will no longer be required to use group-based licensing for license assignments. In addition, nested groups will now work for license assignments.
  • New license types, including device-based licenses and ISV app licensing, will work natively on the new platform.

 

In the future, look forward to hearing more about the new license management platform, including how to get started using it and details on new API and PowerShell options to leverage the new features.

 

Best regards, 

Alex Simons (Twitter: @Alex_A_Simons)

Corporate Vice President of Program Management

Microsoft Identity Division

 

 

Learn more about Microsoft identity:

Updated Jul 29, 2022
Version 5.0

38 Comments

  • DMoenks's avatar
    DMoenks
    Copper Contributor

    Manuel_Mueller 
    As the article only mentions specific cmdlets to be "retired" and generally points towards managing licenses (i.e. writing license states), I'd strongly suspect reading license states isn't impacted for now. I'd expect the latter to be impacted in some way in the near future though.

    After putting some time into Microsoft Graph and trying to access it directly, without using the Graph PowerShell cmdlets, I find it rather satisfying. Putting most-used Graph requests into PowerShell scripts allows for the same ease of access as the currently existing cmdlets, with the added possibility to customize those scripts to match one's needs.

  • Manuel_Mueller's avatar
    Manuel_Mueller
    Copper Contributor

    We are struggling to understand the potential impact in regards to license reporting.

     

    Do the following commands still provide the same information, after this change?

     

    # get license information for a specific user

    Get-MsolUser -UserPrincipalName %UPNofUser% | select Licenses

    # get all license types

    Get-AccountSkuIDs

     

    Yes or no?

     

  • Mallesh_V's avatar
    Mallesh_V
    Copper Contributor

    Hi!! Is anyone aware of this new cmdlet?  if so can you please describe with an example pls. 
    I would like to understand the use case of this new cmdlet, and there is no examples in the article 


    https://docs.microsoft.com/en-us/powershell/module/microsoft.graph.users.actions/set-mguserlicense?view=graph-powershell-beta

  • Neither of the articles linked initially ("In June, I reminded you to...") Mention PowerShell.  

     

    I am hoping that the "new License Management platform" will alleviate the need for me to use programmatic license assignment and this will all be moot. 

     

    I am not looking forward to a whole new class of questions about License Assignment being asked on Reddit/StackExchange, etc.

  • KanakarisA's avatar
    KanakarisA
    Brass Contributor

    What is this? No dashes on operators any more?

     

    Get-MgUser -Filter "DisplayName eq 'Lee Gu'"

     

    I mean this is NOT how Poweshell syntax is supposed to be working.

  • KanakarisA's avatar
    KanakarisA
    Brass Contributor

    All Graph is completely undocumented as far as Powershell is concerned. Also, all Powershell logic (when and how parameters are used and should be used) is drifting to a "custom" logic for each of the Powershell Graph based cmdlets...

     

    This is dissapointing unless real effort is put into:

    1. Delivering proper training and documentation for the Graph APIs 

    2. Delivering Powershell cmdlets to manage Azure AD, no matter the underlying endpoint/protocols/technology used

     

    Making simple tasks like Azure AD management more complicated and unstandardized is not the way to go.

  • DMoenks's avatar
    DMoenks
    Copper Contributor

    Moving from Azure AD Graph to Microsoft Graph with the PowerShell management modules is appreciated, as it seems to be the Microsoft API for such topics. Unfortunately, the documentation status for the Microsoft Graph PowerShell modules is less-than-optimal, it's rather underwhelming in fact.

    We had an initial look at some of Microsoft.Graph.Identity.DirectoryManagement and Microsoft.Graph.Users PowerShell modules' licensing cmdlets, as we use both MSOnline and AzureADPreview PowerShell modules for license management, and the documentation is merely a list of parameters. They're missing helpful descriptions, examples, etc.

     

    Even if customers are willing to migrate their scripts to the new API, the current level of documentation probably doesn't really help.

  • GBeaudoin's avatar
    GBeaudoin
    Brass Contributor

    What do you mean, "I remind" you? That is news to me. I just upgraded a PowerShell application from MSOnline to AzureAD this morning. What's going on? Is PowerShell being depreciated as a way to manage my tenant? How come there is no warning in the official documentation of AzureAD? Should I expect my PowerShell applications to start failing one after the other because the endpoitns for the cmdlets are being turned off one after the other in favor of Graph API and JavaScript?