Repository navigation
Using ITokenAcquirer for non-microsoft oauth provider and custom scopes #3468
Unanswered
Sergi Valbuena Garrido (svalbuena)
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I have an app that talks with Databricks and I need to fetch an access token as described on https://learn.microsoft.com/en-us/azure/databricks/dev-tools/auth/oauth-m2m#oauth-m2m-manual. I know there is the
automatic unified client authenticationmethod but I cannot use that at the moment, so I'm interested on themanual(but automated) approach to retrieve the access tokens.First, I used MSAL (library Microsoft.Identity.Client)
IConfidentialClientApplication.AcquireTokenForClient(scopes: ["all-apis"])to retrieve the access token and this worked well. Then on Choosing a version of MSAL.NET documentation I saw I could use Microsoft.Identity.Web library to do the same, from what I understood it's preferred to use this library as it's an abstraction on top of MSAL and handles a few more things for you, so I tried usingITokenAcquirer.GetTokenForAppAsync(scope: "all-apis")but it complaints that the scope is invalid and I should use one that ends with "/.default""IDW10404: 'scope' parameter should be of the form 'AppIdUri/.default'. See https://aka.ms/ms-id-web/daemon-scenarios. (Parameter 'scope')".I'm confused, is the Microsoft.Identity.Web incompatible with OAuth/OIDC providers that are not Microsoft? For my use case should I just use MSAL with IConfidentialClientApplication?
All reactions