In this blog, you will see how to call Microsoft Graph service using Microsoft Graph PowerShell SDK.
Prerequisites
Install the following modules
  1. Install-Module Microsoft.Graph

PowerShell Script

Open Notepad and paste the following script. Save the file as script.ps1.
  1. # Connect To Graph and authenticate using Delegated access via Device Code Flow
  2. Connect-Graph -Scopes "User.Read"
  3. # Retrieve all users
  4. Get-MgUser
  5. # Disconnect
  6. Disconnect-Graph
Open SharePoint Online Management shell and navigate to the location where the script file was saved.
Run the following command.
.\script.ps1
How To Call Graph API Using Microsoft Graph PowerShell SDK
Reference
https://github.com/microsoftgraph/msgraph-sdk-powershell

Summary

Thus, in this blog, you saw how to call Microsoft Graph service using Microsoft Graph PowerShell SDK.