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

[QUERY] AuthenticateAsync() causes error invalid_client AADSTS650057 #47358

Open
DanielHWe opened this issue Nov 27, 2024 · 3 comments
Open

[QUERY] AuthenticateAsync() causes error invalid_client AADSTS650057 #47358

DanielHWe opened this issue Nov 27, 2024 · 3 comments
Assignees
Labels
Azure.Identity Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-author-feedback Workflow: More information is needed from author to address the issue. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@DanielHWe
Copy link

Library name and version

Azure.Identity 1.13.1

Query/Question

I tryed to persist a AuthenticationRecord like described in section "Silently authenticate a user with AuthenticationRecord and TokenCachePersistenceOptions" of TokenCache

But I always ending in getting the error Error details: error invalid_client error_description: AADSTS650057: Invalid resource. The client has requested access to a resource which is not listed in the requested permissions in the client's application registration.

Eroor shown in Browser by calling AuthenticationRecord authRecord = await credential.AuthenticateAsync();

I tryed to change the scope and the API Permissions in entry, currently I have File.ReadWrite.All, Application.ReadWrite.All, Directory.ReadWrite.All, AuthenticationContext.Read.All, offline_access, openid, profile, User.read.

But that did not help.

I have a WPF Desktop App and how may I able to Silently authenticate a user, so he must not login within the browser each time the application is restarted. (Currently I'm using InteractiveBrowserCredentialOptions)

Environment

Windows 11, .Net 8, WPF Desktop App

@github-actions github-actions bot added Azure.Identity Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Nov 27, 2024
Copy link

Thank you for your feedback. Tagging and routing to the team member best able to assist.

@christothes
Copy link
Member

Hi @DanielHWe -
Are you able to get a token interactively without persisting the AuthenticationRecord or does this error only occur when trying the silent auth flow? If the error occurs both ways, this sounds like an Entra ID configuration issue. If interactive authentication works but silent doesn't, can you provide a minimal code snippet that reproduces the problem including any relevant details about your app registration configuration?

@christothes christothes added the needs-author-feedback Workflow: More information is needed from author to address the issue. label Dec 2, 2024
Copy link

github-actions bot commented Dec 2, 2024

Hi @DanielHWe. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.

@github-actions github-actions bot removed the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Azure.Identity Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-author-feedback Workflow: More information is needed from author to address the issue. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
Status: Untriaged
Development

No branches or pull requests

2 participants