Tag: Microsoft Graph PowerShell SDK

Latest Articles

Practical Graph: Assigning Sensitivity Labels to SharePoint Files with the PowerShell SDK

A new Set-MgDriveItemSensitivityLabel cmdlet makes it easier to assign sensitivity labels in PowerShell scripts. However, the cmdlet does not get around the restriction imposed by Microsoft on using metered APIs. Apps still must be registered as Azure resources before scripts can run the cmdlet. It's easy to understand why, even if it seems strange at first.

June 30, 2025

Practical Graph: Reporting the Status of Group-Based License Assignments

This article describes how to create a report about group-based licensing assignments and any errors that might have occurred. The code uses the Microsoft Graph PowerShell SDK to fetch information about the groups used for licensing assignments, interpret the assignments, find users with assignment errors, and send email to inform administrators about what's been found.

March 12, 2025

Practical Graph: Apply Retention Labels to Unlabeled SharePoint Files

A previous article described a script to find SharePoint Online files that didn't have retention labels. This article picks up the thread and shows how to use the data generated by the previous script to apply retention labels to the unlabeled files using cmdlets from the Microsoft Graph PowerShell SDK. Some issues are met along the way, but the script works and does the job, which is all that counts at the end of the day.

January 27, 2025