Microsoft.Graph PowerShell Module 2.0.0-preview2 released

Hi All,

Just a few Hours ago, Microsoft has released Microsoft.Graph 2.0.0-preview2 PowerShell Modules to the PowerShell Gallery.

With the 2.x Version of the Module there has been changed a lot

Breaking Changes:

  • Drops profile support (Select-MgProfile) in favor of independent v1.0 and beta modules.
  • Drops support for -ForceRefresh on Connect-MgGraph.
  • Renames beta command names from <Verb>-Mg<Noun> to <Verb>-MgBeta<Noun>.
  • Changes beta namespace from Microsoft.Graph.PowerShell.Models.<Entity> to Microsoft.Graph.Beta.PowerShell.Models.<Entity>.
  • Changes -AccessToken type on Connect-MgGraph from String to SecureString.

New Features and Improvements:

  • Adds managed identity support.
  • Adds client secret credentials support.
  • Adds current user and local machine certificate store lookup when using certificate credentials.
  • Adds environment variable based auth support.
  • Adds HTTP/2 support.
  • Adds success status code range support.

Microsoft Graph SDK PowerShell Releases

Microsoft Graph PowerShell V2 Changelog and Upgrade Guide

Check what Version is installed and what is available in the PowerShell Gallery. With the Version 2.x there are now two Modules available Microsoft.Graph and Microsoft.Graph.Beta

Get-InstalledModule Microsoft.Graph
Find-Module Microsoft.Graph -AllowPrerelease
Find-Module Microsoft.Graph.Beta -AllowPrerelease

Install the Modules Side by side with the current Module

# For Microsoft Graph v1.0
Install-Module Microsoft.Graph -AllowPrerelease -AllowClobber -Force
# For Microsoft Graph beta
Install-Module Microsoft.Graph.Beta -AllowPrerelease -AllowClobber -Force
Get-InstalledModule Microsoft.Graph
Get-InstalledModule Microsoft.Graph.Beta

To use the V1 Endpoint use the following Commands

Connect-MgGraph
Get-MgUser -UserId a.bohren@icewolf.ch
Disconnect-MgGraph

To use the Beta Endpoint use the following Command

Connect-MgGraph
Get-MgBetaUser -UserId a.bohren@icewolf.ch
Disconnect-MgGraph

Regards
Andres Bohren