Repository navigation
Allow getting an access token using the broker - #3833
Merged
Ramses Sanchez-Hernandez (ramsessanchez) merged 2 commits intoNov 5, 2026
Merged
Ramses Sanchez-Hernandez (ramsessanchez) merged 2 commits into
Ramses Sanchez-Hernandez (ramsessanchez) merged 2 commits into
Conversation
Contributor
|
I will need to run some local tests |
Contributor
Author
|
Ramses Sanchez-Hernandez (@ramsessanchez) off course. Take your time, this PR might need some changes to the docs part of it. No clue how that works and/or is published to the website |
Ramses Sanchez-Hernandez (ramsessanchez)
approved these changes
Nov 5, 2026
Ramses Sanchez-Hernandez (ramsessanchez)
merged commit Nov 5, 2026
5dd9caa
into
microsoftgraph:main
2 checks passed
Ramses Sanchez-Hernandez (ramsessanchez)
added a commit
that referenced
this pull request
Nov 5, 2026
This reverts commit 5dd9caa. The Get-MgAccessToken implementation introduces Azure.Core references into the public cmdlet assembly and fails the Authentication assembly-isolation tests, blocking PR #3864. Reapply the feature in a replacement PR for review after this revert lands. Co-authored-by: Microsoft Graph DevX Tooling <GraphTooling@service.microsoft.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This was referenced Nov 5, 2026
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.
Fixes #2023
Fixes #3806
Changes proposed in this pull request
Get-MgAccessToken -Scopes ...and don't need there own identity clientConsiderations
This PR simplifies getting an access token in a somewhat secure way. You can be against that, and that is fine. A bunch of other tools provide a similar way (azure cli, various other modules and there is an unsupported trick that does exactly the same).
Let's provide a way for everybody (also those that don't understand authentication using the broker), to get access tokens. Everybody is struggling with authentication. And interactive authentication using the broker is the safest way possible. As a security MVP I rather see people calling this method in their scripts and doing interactive authentication, then all those samples with:
As this is a new commandlet in the
Microsoft.Graph.Authenticationmodule I hope I've followed all the correct structures. I can use the help in getting this released.