Articles, views, and insights about the practical application of the Microsoft Graph APIs (including the Microsoft Graph PowerShell SDK) from Practical365.com
Latest Articles
The need to restore deleted user accounts sometimes arises. The process is well understood and options are available to do the job in the Entra and Microsoft 365 admin centers. But if you need to restore a deleted user account and change its user principal name, that operation can only be done with PowerShell. This article explores why updating a user principal name during a restore might be necessary and the code to restore accounts.
Most Microsoft 365 tenants have a collection of Entra ID apps to manage. One task might be to control access to Entra ID apps, so the question is how best to do this. Assignments for users and groups control the ability to use apps while custom app roles are there for developers to determine what a user can done when they run an app.
The Microsoft Graph API offers great access to SharePoint Online site content, but sometimes the need exists to resist app access to SharePoint Online sites. That's where the Sites.Selected Graph permission comes in by allowing administrators to dictate exactly which sites an app can access. Practice the Principle of Least Permission!
This article describes what happens when the Connect-MgGraph cmdlet runs in interactive and app-only sessions with the Microsoft Graph PowerShell SDK. A session is created and a context is established, and it's possible to use the session context to do real work.
Microsoft announced the Retirement of EWS in Exchange Online a while ago. That means any scripts or applications you have written should be reviewed and rewritten to use Microsoft Graph. In this blog, we review an example of moving from EWS to the Graph while handling date values.
Sometimes Microsoft 365 tenants need to store specific data for objects like users and groups. The Graph provides several extensibility options. This article describes how to define and use schema extensions to store information about the container management labels assigned to Microsoft 365 Groups.
Oversharing of information is a major concern in the AI era. This article describes how to write a script to report file sharing for OneDrive for Business accounts. The report details the files shared, the type of sharing link and access, and who can access the files. It's an example of using the Microsoft Graph PowerShell SDK to understand what's happening in a tenant.
The room mailbox statistics script has proven to be a popular script downloaded and used by many to analyze the usage patterns of room mailboxes. Recently, a reader pointed out that the Graph API request to fetch workspaces didn't work. Microsoft has changed the Places resource and the request now needed to run against the beta endpoint. All of which brought me to rewrite the script using the Graph SDK.
This episode of Practical Purview showcases some compliance controls that you should consider including in any provisioning solution. This is not an exhaustive list, but rather some key controls to consider.
Users receive all manner of notification messages from different sources. These messages are of no great value after a few days, so here's a script to find and remove messages to clean up mailboxes. All written using cmdlets from the Microsoft Graph PowerShell SDK.
Three years ago, we described how to create organizational contacts in user mailboxes with Graph API requests. In this iteration, we read the contacts from a Microsoft list and use Microsoft Graph PowerShell SDK cmdlets to update user mailboxes. The techniques explained in the article can be used in many scenarios.
Microsoft Lists are a powerful tool for end users to store and manage data stored in SharePoint Online sites. The Microsoft Graph PowerShell SDK includes cmdlets to work with Microsoft Lists and this article explains how to use the cmdlets to add new lists, add items to lists, retrieve data from lists, and remove items from lists.