Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Gov Clouds(Fairfax and Mooncake) Failures: MsalClientException ErrorCode: authority_override_regional #4405

Closed
sdk-jain opened this issue Nov 2, 2023 · 2 comments · Fixed by #4406
Assignees
Milestone

Comments

@sdk-jain
Copy link

sdk-jain commented Nov 2, 2023

Library version used

4.45.0

.NET version

4.7.2

Scenario

ConfidentialClient - service to service (AcquireTokenForClient)

Is this a new or an existing app?

The app is in production, and I have upgraded to a new version of MSAL

Issue description and reproduction steps

We are seeing MSAL exceptions after Microsoft.Identity.Client package upgrade and only in Gov clouds.

MSAL.Desktop.4.45.0.0.MsalClientException:   ErrorCode: authority_override_regional Microsoft.Identity.Client.MsalClientException: You configured WithAuthority at the request level, and also WithAzureRegion. This is not supported when the environment changes from application to request. Use WithTenantId at the request level instead.

Tried below fix as per some posts but that also didnt work:

newAuthenticationTask = newAuthenticationContext.AcquireTokenForClient(scopes).WithAuthority(newAuthorityId, false).WithSendX5C(isManagedCert).ExecuteAsync();

As we looked and discussed there was a breaking change done in recent release which is causing this:
image

@MSAL team: Please look and fix this issue.

Relevant code snippets

No response

Expected behavior

No response

Identity provider

Microsoft Entra ID (Work and School accounts and Personal Microsoft accounts)

Regression

4.45.0

Solution and workarounds

No response

@sdk-jain sdk-jain added needs attention Delete label after triage untriaged Do not delete. Needed for Automation labels Nov 2, 2023
@bgavrilMS bgavrilMS added bug P2 Supportability and removed untriaged Do not delete. Needed for Automation needs attention Delete label after triage labels Nov 2, 2023
@bgavrilMS
Copy link
Member

Let's deprecate WithAuthority at the request level with an [Obsolete] attribute.

@pmaytak pmaytak added this to the 4.58.0 milestone Nov 2, 2023
@rayluo
Copy link
Contributor

rayluo commented Nov 3, 2023

@MSAL team: Please look and fix this issue.

Side note to @sdk-jain , that @MSAL github account is not owned by MSAL team.

@bgavrilMS bgavrilMS linked a pull request Nov 6, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants