Automating Microsoft 365 with PowerShell Update 19

Update Part of Office 365 for IT Pros January 2026 Release

The Office 365 for IT Pros team is delighted to announce that update #19 for the Automating Microsoft 365 with PowerShell eBook is available for subscribers to download. Please use the link in the receipt emailed after purchase or your Gumroad.com account to fetch the updated PDF and EPUB files. We have also updated the Kindle and Paperback editions available from Amazon.com. Subscribers who purchase through Gumroad can transfer the EPUB version to Kindle.

Updates and Revisions

Like all our monthly updates, update #19 contains a mixture of new material, updates, and revisions. The pace of change in the Microsoft world eases at this time of year as Microsoft engineers take time out for the holidays, so there’s nothing dramatic to report in terms of new content.

Largely because not much has happened with the SharePoint Online management module, it was nice to see Microsoft deliver support for app-only authentication based on X.509 certificates. This is still a Windows PowerShell module. Even if it’s possible to use the module with PowerShell Core, it would be nice if Microsoft did the necessary work to upgrade the module fully.

The New Create Site Graph API

Also in the SharePoint space, I think it’s fair to say that Graph API coverage for SharePoint Online is spotty in places. For instance, while a Graph API exists to create a SharePoint list, you can’t create a SharePoint site unless you’re creating a Microsoft 365 group or team, in which case background provisioning takes care of creating the associated site. On November 24, 2025, Microsoft announced the beta of a Graph API to create sites (Figure 1) together with a new Site.Create.All Graph permission to reduce the level of permission needed for an app or person to create sites.

SharePoint Create Site Graph API (source: Microsoft).

Automating Microsoft 365 with PowerShell.
Figure 1: SharePoint Create Site Graph API (source: Microsoft)

Documentation for the create Site API is available online. Initially, I couldn’t get the API to work at all and reported the fact to Microsoft. Some tweaking clearly took place and now this code works to create a communications site.

$Uri = "https://graph.microsoft.com/beta/sites/"
$Params = @{
   name = "Communication Site Test"
   webUrl = "https://office365itpros.sharepoint.com/sites/commsite1"
   locale = "en-US"
   shareByEmailEnabled = $false
   description = "A test communication site"
   template = "sitepagepublishing"
   ownerIdentityToResolve = @{
     email = "Marty.King@Office365itpros.com"
   }
}

Invoke-MgGraphRequest -Uri $Uri -Method POST -Body $Params

Changing the template type to sts (team site without a Microsoft 365 group) also works. However, any attempt to create a site using the group template fails with a 500 internal server error. It’s unsurprising that the creation of the most complex site type would run into some problems. In any case, the Microsoft Graph PowerShell SDK doesn’t include a cmdlet for the create Site API, so we don’t currently cover the API in Automating Microsoft 365 with PowerShell. Hopefully, the issue with the (beta) API will be resolved soon and we’ll include coverage in the next eBook update.

New Version of the Microsoft Graph PowerShell SDK

Microsoft released V2.33 of the Microsoft Graph PowerShell SDK on 9 December 2025. So far, everything appears stable. However, the first report of a V2.33 problem popped up in GitHub with an error in the New-MgTeamChannelMember cmdlet. As it turns out, it seems like a) the issue has been around going back to at least V2.28, and b) the usual workaround of using the Graph API works. For example:

$User = Get-MgUser -UserId Alain.Charnier@Office365itpros.com
$Team = Get-MgTeam -Filter "DisplayName eq 'Microsoft 365 Adoption'"
$Channel = Get-MgTeamChannel -TeamId $Team.Id -Filter "DisplayName eq 'Project Infinity'"
$Uri = ("https://graph.microsoft.com/v1.0/teams/{0}/channels/{1}/members" -f $Team.id, $Channel.id)
$Roles = @("member")
$UserId = $User.Id
$Body = @{}
$Body.Add("@odata.type", "#microsoft.graph.aadUserConversationMember")
$Body.Add("roles", $Roles)
$Body.Add("user@odata.bind", "https://graph.microsoft.com/v1.0/users('$UserId')")
Invoke-MgGraphRequest -Uri $uri -Method POST -Body $Body

Microsoft subsequently released V2.34 on 20 December 2025. Pushing out a new release so soon after V2.33 is odd, especially just before a major holiday period. I can’t find any information (the engineers are all on holiday) about why they pushed a new version so quickly, so test V2.33 or V2.34 very carefully before putting either version into production.


Speaking of which, if you’re looking for code to test with, why not visit the Office 365 for IT Pros GitHub repository. I’m sure that you’ll find something there to test common Microsoft Graph PowerShell SDK cmdlets.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.