Microsoft 365 – Microsoft Graph PowerShell – way to go now

Microsoft Graph PowerShell SDK
Microsoft Graph PowerShell SDK

Hi All,

Greetings for the day!

Even though we already started series on Microsoft PowerShell Graph but I realise then I should have also explain why to use Microsoft Graph PowerShell – one basic introductory article.

What is Microsoft Graph PowerShell

  • Microsoft Graph PowerShell is wrapper for Microsoft Graph APIs
  • Using Microsoft Graph APIs in PowerShell
  • Microsoft Graph PowerShell is the replacement for the Azure AD PowerShell and MSOnline modules and is recommended for interacting with Microsoft Entra ID
  • Microsoft PowerShell SDK contains 2 modules
    • Microsoft.Graph – this ultimately calls – Microsoft Graph REST API v1.0
    • Microsoft.Graph.Beta – this ultimately calls – Microsoft Graph REST API beta
  • Microsoft PowerShell SDK supports 2 types of authentication
    • delegated access
    • app-only access
  • Each API in Microsoft Graph PowerShell is protected by one or more permission scopes. Logged in user must consent to required respective permission scopes for the API
  • CMDLETs of Microsoft Graph PowerShell are directly generated from Microsoft Graph REST APIs.
  • PowerShell CMDLETs are named using verb – noun pair like Get-Command. In Microsoft Graph PowerShell all nouns are prefixed with “Mg” prefix as Get-MgUser – to list all users in my tenant
  • Microsoft Graph PowerShell is open source and we (users) can contribute to those
  • Supports modern authentication: Microsoft Graph PowerShell supports the Microsoft Authentication Library (MSAL) which offers more security. For example, we can use passwordless sign-in experiences

Why to switch to Microsoft Graph PowerShell

  • As per Microsoft – Azure AD, Azure AD Preview and MSOnline PowerShell modules are planned for depreciation.
  • Microsoft Graph PowerShell is the PowerShell module should be used for interacting with Microsoft Cloud Services
  • Microsoft Graph PowerShell module is compatible with Windows PowerShell 5.1 and works with PowerShell 7 and later

Advantages of using Microsoft Graph PowerShell module

  • Microsoft Graph PowerShell is based on Microsoft Graph API. Microsoft Graph APIs include APIs for almost all Microsoft services including – Microsoft Entra ID, SharePoint, Exchange, Teams, outlook and so on. All these are accessible with single end point – https://graph.microsoft.com/ and with single access token
  • Microsoft Graph PowerShell module works on all platforms including Windows, macOS, and Linux – Cross Platform
  • Microsoft Graph PowerShell supports the Microsoft Authentication Library (MSAL) which offers more security. For example, we can use Passwordless sign-in experiences
  • Users from other Microsoft Entra tenants can authenticate to services in our tenant with Microsoft Graph PowerShell – External users
  • Microsoft Graph PowerShell commands are updated regularly to support the latest Graph API updates

Where to Start

Thanks for reading ! Stay tuned for more articles on PowerShell !

HAPPY LEARNING AHEAD 🙂 LIFE IS BEAUTIFUL

Prasham Sabadra

LIFE IS VERY BEAUTIFUL. ENJOY THE WHOLE JOURNEY :) Founder of Microsoft 365 Junction, Speaker, Author, Learner, Developer, Passionate Techie. Certified Professional Workshop Facilitator / Public Speaker. Believe in knowledge sharing. Around 20+ years of total IT experience and 17+ years of experience in SharePoint and Microsoft 365 services Please feel free me to contact for any SharePoint / Microsoft 365 queries. I am also very much interested in behavioral (life changing) sessions like motivational speeches, Success, Goal Setting, About Life, How to live Life etc. My book - Microsoft 365 Power Shell hand book for Administrators and Beginners and 100 Power Shell Interview Questions - https://www.amazon.in/Microsoft-Administrators-Beginners-Interview-Questions/dp/9394901639/ref=tmm_pap_swatch_0?_encoding=UTF8&qid=1679029081&sr=8-11

You may also like...

1 Response

Leave a Reply

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