Microsoft Graph
130 TopicsWhat’s the Best Way to Find SharePoint Online Sites with Graph PowerShell?
What’s the best way to find SharePoint sites with the Microsoft Graph PowerShell SDK? Is the Get-MgAllSite cmdlet best or should you use the Get-MgSite cmdlet? Does it matter if you’re looking for one site or many sites? We explore the issue in this article by examining some reasons why you’d choose Get-MgSite and others that drive the decision for Get-MgAllSite. https://office365itpros.com/2025/10/06/get-mgallsite-and-get-mgsite/22Views0likes0CommentsFinding the Last App Accessed by a User
A reader question asked if it was possible to find the last app accessed by a user. Of course, anything is possible with PowerShell, but how? In this article, we explore using the Entra ID sign-in logs and Microsoft 365 audit log as sources for finding the desired information. Some performance issues emerge, so we end up running the code in Azure Automation. https://practical365.com/last-app-access-by-user/19Views0likes0CommentsAutomating Microsoft 365 with PowerShell Second Edition
The Office 365 for IT Pros team are thrilled to announce the availability of Automating Microsoft 365 with PowerShell (2nd edition). This completely revised 350-page book delivers the most comprehensive coverage of how to use Microsoft Graph APIs and the Microsoft Graph PowerShell SDK with Microsoft 365 workloads (Entra ID, Exchange Online, SharePoint Online, Teams, Planner, and more). Existing subscribers can download the second edition now free of charge. https://office365itpros.com/2025/06/30/automating-microsoft-365-with-powershell2/219Views1like4CommentsIs hsprotect.net a Microsoft property? Graph authentication
Running connect-mggraph, I get the IE "Sign in to your account/Verify your identity" windows. The first time through, it presents several of the "Trusted Sites" dialogs, to add various MS URLs to the trusted zone. One of them is https://iframe.hsprotect.net. The WHOIS for this domain does not list Microsoft. It's NameCheap, with "withheld for privacy" addresses in Iceland. Microsoft does not document this domain anywhere, though A.I. claims/hallucinates that MS uses it for protection-related telemetry and is certain it's in the Defender API guide. Can anyone confirm what's going on here?40Views0likes0CommentsMicrosoft Deprecates Graph CLI and Toolkit
Microsoft has depreciated the Microsoft Graph CLI and Graph Toolkit. It’s nice to see some rationalization in this area, but the real need is for better quality and coverage across all the Microsoft 365 administrative actions. Even after fourteen years of development, too many undocumented and private APIs exist in use today in places like the Microsoft 365 admin center, which is an unacceptable situation. You should vote for a feedback portal item (link in article) to ask Microsoft to do better. https://office365itpros.com/2025/09/02/microsoft-graph-inconsistencies/40Views0likes0CommentsCreating Dynamic Microsoft 365 Groups without Entra P1 Licenses
Dynamic Microsoft 365 Groups come with many advantages, but they also require Entra P1 licenses. This article explores how to create and maintain a DIY version of dynamic Microsoft 365 groups using the Microsoft Graph PowerShell SDK and Azure Automation. At the end of the day, the principle is proven, but maybe it's best to pay for the licenses. https://practical365.com/diy-dynamic-microsoft-365-group/40Views1like0CommentsPractical Graph: Working with Calendar Events Using Graph APIs
Calendar events make up user and group calendars. It's possible to create, update, cancel, and remove calendar appointments and meetings, including recurring events, through the Graph API. This article explains how to pass all the properties needed to create and manage events using PowerShell and the Graph APIs. https://practical365.com/calendar-events-graph-api/436Views1like1CommentHow to Remove Members from Microsoft 365 Groups with PowerShell
After writing about how to copy group memberships from one user to another, the question arises about removing members from groups. The answer is straightforward when dealing with members of distribution lists and mail-enabled security groups, but things become more complicated when working with Microsoft 365 groups and it’s important to handle group owners correctly. https://office365itpros.com/2025/07/23/removing-members-from-groups/151Views0likes2CommentsUsing Purview eDiscovery APIs in App-Only Mode
Most eDiscovery work is done interactively, but a use case exists for working with eDiscovery cases through apps, such as populating a large review set. It’s possible to configure an Entra ID app to work with the eDiscovery APIs in app-only rather than delegated mode, but only by using an Exchange service principal to add the app to the eDiscovery manager role group. This approach also works with Azure Automation runbooks that use Managed Identities. https://practical365.com/ediscovery-app-only-mode/29Views0likes0CommentsMicrosoft Graph PowerShell SDK V2.29 Now Available
Version 2.29 of the Microsoft Graph PowerShell SDK can now be downloaded from the PowerShell Gallery. Initial tests show that the release is stable. However, it’s recommended that you deploy V2.29 on a few workstations to test essential scripts before proceeding to a full-scale roll-out. V2.29 does not address the issue with PowerShell runtime in Azure Automation, but overall, first indications are that V2.29 is a good release. https://office365itpros.com/2025/07/11/microsoft-graph-powershell-sdk229/85Views0likes0Comments