Microsoft has extended the deprecation date for the Azure AD license management cmdlets to March 31, 2023. After that time, the cmdlets won't work. The strong recommendation is to replace all the old Azure AD and MSOL license management cmdlets in scripts with Microsoft Graph PowerShell SDK cmdlets or Graph API requests. You have an extra 7 months to do the job, do there's no excuse!
It's common to find a requirement to create new Microsoft 365 accounts with PowerShell. We're at a point of transition when the old method of using the Azure AD module will switch to the Microsoft Graph PowerShell SDK or Graph API queries. In this article, we explain how to create new accounts and assign licenses with both the Azure AD module and the Microsoft Graph PowerShell SDK.
Microsoft has announced that they won't support the Azure AD Graph after June 30, 2022. This means that the Azure AD PowerShell module won't be supported either. With that in mind, it's probably a good idea to think about how to upgrade scripts to use Graph API calls instead of Azure AD cmdlets. In this article, we take a script created to count members in distribution lists and convert it to use the Graph. As it turns out, the Graph bit is easy. It's all the housekeeping beforehand that takes the time.