0.3.2: WAM-free Graph sign-in via MgGraphCommunity (required, auto-installed)#67
Closed
ugurkocde wants to merge 1 commit into
Closed
0.3.2: WAM-free Graph sign-in via MgGraphCommunity (required, auto-installed)#67ugurkocde wants to merge 1 commit into
ugurkocde wants to merge 1 commit into
Conversation
Replaces Microsoft.Graph.Authentication with the MgGraphCommunity module for all Graph sign-in and requests. Interactive login now uses the classic browser authorization-code flow (PKCE) instead of the WAM broker that the Graph SDK made mandatory in v2.34.0, which blocks secondary and service accounts. Device code, certificate, and client secret flows map 1:1. - The module is checked and auto-installed at startup (the old #Requires line would have blocked startup before any install UI could run). - All requests go through Invoke-MgGraphCommunityRequest with hashtable output for parity with the SDK cmdlet. Tokens now refresh automatically during long sessions (proactive refresh plus reactive 401 retry). - Retry wrappers and 403/404 checks parse status codes from the module's message format instead of $_.Exception.Response, which it does not set. - Prerequisites dialog and README updated; version bumped to 0.3.2. Verified against MgGraphCommunity 1.4.0 from the Gallery: cmdlets and parameter sets used by every flow resolve, and the extracted retry wrapper passes 403/429/500/pagination tests against mocked module errors. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Switches all Microsoft Graph authentication and requests from Microsoft.Graph.Authentication to MgGraphCommunity, making interactive sign-in work without the WAM broker. The module is required and installed automatically on first run.
What changed
#Requires -Modules Microsoft.Graph.Authenticationline is gone (it blocked startup before any install UI could run). Instead the script checks for MgGraphCommunity at launch and auto-installs it from the Gallery, soInstall-Scriptusers need zero manual steps.Connect-MgGraphCommunityparameter sets. Client secret now passes-ClientIdexplicitly as the module requires.Invoke-MgGraphCommunityRequest -OutputType Hashtablefor shape parity with the SDK cmdlet. Long sessions no longer die at token expiry: the module refreshes proactively and retries 401 reactively..Response, so status-code extraction in the wrappers and the 403/404 checks now parse the message. The actionable-403 feature from 0.3.0 reads$batchbody statuses and is unaffected.Verification
🤖 Generated with Claude Code