Microsoft Graph CLI vs PowerShell SDK

Microsoft recently (Oct 2023) announced Microsoft Graph command-line interface (CLI) tool – mgc.
Microsoft: “The Microsoft Graph PowerShell command-line interface (CLI) acts as an API wrapper for the Microsoft Graph APIs, exposing the entire API set for use from the command line”. Example:

mgc users list --filter "displayName eq 'John Smith'"

Meantime there is a Microsoft Graph PowerShell SDK (PowerShell module Microsoft.Graph ) since 2020. Example:

Get-MgUser -Filter "displayName eq 'John Smith'"

So, what is the difference? Why Microsoft provides two similar tools? What are the use case scenarios, functionality and scope of each one?

Here is the comparison:

Microsoft Graph SDKMicrosoft Graph CLI
Access to all Microsoft Graph APIs
Cross-platform support
Supports modern authentication
Uses least privilege
Open source
Receives regular updates

WIP…

Leave a Reply

Your email address will not be published. Required fields are marked *