You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 authentication method but I cannot use that at the moment, so I'm interested on the manual (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 using ITokenAcquirer.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?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
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 authentication
method 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?
Beta Was this translation helpful? Give feedback.
All reactions