Tag: Get-MgUser

Latest Articles

Update Teams External Access Configuration With PowerShell

The Teams external access configuration includes an allow list that defines which Microsoft 365 tenants are allowed to collaborate with your users through chats and meetings. To make sure that your allow list is complete, we can check the guest accounts present in the tenant and update the configuration with the domains used by guests. All in a matter of some straightforward PowerShell code.

September 15, 2022

How to Create a Microsoft 365 Licensing Report Using the Microsoft Graph SDK for PowerShell

After figuring out how to convert a script from using Azure AD licensing cmdlets (due to stop working in June 2022), we move on to create a licensing report for a tenant using cmdlets from the Microsoft Graph SDK for PowerShell. The code is pretty straightforward, but you need to do some up-front work to extract and prepare some input files containing product and service plan codes. Given that Microsoft is increasing its license fees, it's a good time to report this information...

October 14, 2021

Connecting to the Microsoft Graph Using the PowerShell SDK

The Microsoft Graph SDK for PowerShell exists to help developers use Graph API calls from PowerShell. It works, but like anything in life, there's a right way to connect and use the SDK and a wrong way. In this article we explore topics like how to connect to the right tenant, how permissions are managed (or not), and why running Graph SDK cmdlets interactively isn't something you should do in production. Good as the SDK is, Microsoft has some big issues to solve to address some obvious security issues.

September 23, 2021

Microsoft Forces Move from Azure AD Cmdlets for License Management

On June 30, 2022, Azure AD and Microsoft Online Services cmdlets will stop working for license management. The result is that you need to upgrade PowerShell scripts which use these cmdlets. The choice is to use Graph API calls or cmdlets from the Microsoft Graph PowerShell SDK. In this article, we explore the steps necessary to upgrade a script to remove service plans from an Office 365 license (SKU).

September 9, 2021