Add Audience
as an alias to TenantId
.
#728
Merged
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.
This PR closes #497 by:
-Audience
as an alias to-TenantId
. This allows customers to specify the sign-in audience they want to connect to. Also,TenantId
andAudience
are mutually exclusive and cannot be used together. See https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-client-application-configuration#authority.Invalid_Scope
error message by addingPlease retry by specifying a sign-in -Audience or -TenantId to Connect-MgGraph. e.g., Connect-MgGraph -Audience 'organizations' -Scopes 'YOUR_SCOPES' -UseDeviceAuthentication.
as a suggestion that can be used to resolve the error. When using device code flow, MSAL validates the provided scopes to see if they can be consented to usingcommon
audience (default audience). AnInvalid_Scope
error is thrown if the audience can't consent to the provided scope.Proposal
Ref - https://docs.microsoft.com/en-us/azure/active-directory/develop/reference-aadsts-error-codes#aadsts-error-codes.