Monday, July 10, 2023

The Microsoft Graph PowerShell SDK 2.0 has been released as a generally available version.

The latest version of Microsoft Graph PowerShell SDK offers a plethora of new and upgraded features. It's advisable to upgrade your current PowerShell SDK module to version 2.0 and make the most of these features.


What has changed?

  • When using Graph PowerShell SDK 1.0, it is necessary to manually switch the API profile by utilizing the command Select-MgProfile -Name beta or V1.0 when needing access to either version. With the new upgrade (2.0) Microsoft is depreciating Select-MgProfile to switch between V1.0 and beta. 

It's important to note that Connect-MgGraph will automatically connect to V1.0 by default.

  • To utilize beta API commands, it is necessary to install a separate Beta PowerShell Module by running the command "Install-Module Microsoft.Graph.Beta -AllowClobber".

  • In the same profile, you can access the V1.0 and beta commands. This improves the error handling.
  • With MgBeta, every beta command has its unique syntax, and the current syntax will remain unchanged with the command prefix being the "mg" prefix. The user can easily navigate through the commands without any confusion.


# For Microsoft Graph v1.0
Install-Module Microsoft.Graph -AllowClobber

# For Microsoft Graph beta
Install-Module Microsoft.Graph.Beta -AllowClobber


Install Beta module-


With the latest update, it's now possible to use both v1.0 and beta commands in a single script without the hassle of reloading the entire module.


Release notes -

  • Adds Managed identity support.
  • Adds client secret credentials support.
  • Adds support for both current user and local machine certificate store lookup. Priority is given to certificates in CurrentUser store if two identical certificates are present in both stores.
  • Adds environment variable based authentication support.
  • Adds paging support to delta commands.
  • Adds dedicated count commands for supported APIs.
  • Adds logging of MSAL events to debug stream when using Connect-MgGraph.
  • Adds parameter completer for -Period in Reports module and -ConsistencyLevel parameter.
  • Adds preview support for WAM.
  • Fixes escaping of -Filter values.
  • Fixes handling of claims challenge.
  • Fixes wrongly pluralized command names.
  • Fixes date assignment in Reports module.
  • Makes enhancements to -WhatIf on supported commands.
  • Makes improvements to how service errors surface to the error stream.
  • Improves API coverage by adding support for previously unsupported APIs.
  • Resolves assembly conflicts with common modules.
  • Drops the use of profiles to switch between API versions. Service modules are now split by API version.
  • Drops support for -ForceRefresh on Connect-MgGraph.
  • Renames beta command names from <Verb>-Mg<Noun> to <Verb>-MgBeta<Noun>.
  • Renames DeviceManagement.Enrolment module to DeviceManagement.Enrollment.
  • Moves directory role and entitlement management commands from DeviceManagement.Enrollment to Identity.Governance module.
  • 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

No comments:

Post a Comment