How microsoftgraph/msgraph-sdk-powershell works
Microsoft Graph PowerShell is an SDK for invoking Microsoft Graph resources through PowerShell commands, with authentication, request configuration, and scenario-specific modules for v1.0 and beta. The principal workflow is a user running a resource command that wraps a Graph API operation. Authentication and HTTP-client internals are represented where source excerpts or the SOURCE INDEX support their relationships. The sampled material does not establish how generated scenario commands connect to the shared client, so that link is documented but unverified.
Main entry points: GraphSession.cs Graph session · GraphHttpClientFactory.cs HTTP client factory · src Resource commands · custom Applications resources
Components 19
PowerShell commands
- Resource commands
src - Auth commands
src/Authentication/Authentication/Cmdlets
Authentication and session
- Graph session
src/Authentication/Authentication.Core/Common/GraphSession.cs - Auth context
src/Authentication/Authentication/Models/AuthContext.cs - Auth provider setup
src/Authentication/Authentication.Core/Utilities/AuthenticationHelpers.cs - Graph environments
src/Authentication/Authentication/Models/GraphEnvironment.cs - Graph settings
src/Authentication/Authentication/Common/GraphSettings.cs - Disk data store
src/Authentication/Authentication/Common/DiskDataStore.cs
HTTP pipeline
- HTTP client factory
src/Authentication/Authentication.Core/Http/GraphHttpClientFactory.cs - Authentication handler
src/Authentication/Authentication.Core/Http/AuthenticationHandler.cs - OData query handler
src/Authentication/Authentication/Handlers/ODataQueryOptionsHandler.cs
Graph resources
- Applications resources
src/Applications/beta/custom - Calendar resources
src/Calendar/beta/custom - Files resources
src/Files/beta/custom - Groups resources
src/Groups/beta/custom - Teams extensions
src/Teams/beta/custom
Other components
- PowerShell user
- PowerShell
- Microsoft Graph API
Connections 14
- PowerShell user → PowerShell: runs commands
README.md - PowerShell → Resource commands: invokes wrappers
README.md - Resource commands → Microsoft Graph API: calls Graph
README.md - PowerShell → Auth commands: configures access
- HTTP client factory → Auth provider setup: creates provider
src/Authentication/Authentication.Core/Http/GraphHttpClientFactory.cs - HTTP client factory → Authentication handler: registers handler
src/Authentication/Authentication.Core/Http/GraphHttpClientFactory.cs - Graph session → Auth context: references context
src/Authentication/Authentication.Core/Common/GraphSession.cs - Graph session → Graph environments: references environment
src/Authentication/Authentication.Core/Common/GraphSession.cs - Graph session → Disk data store: references store
src/Authentication/Authentication.Core/Common/GraphSession.cs - Applications resources → Microsoft Graph API: wraps API operations
README.md - Calendar resources → Microsoft Graph API: wraps API operations
README.md - Files resources → Microsoft Graph API: wraps API operations
README.md - Groups resources → Microsoft Graph API: wraps API operations
README.md - Teams extensions → Microsoft Graph API: wraps API operations
README.md