Which authentication provider to use when in a java app running behind azure app service easy auth? #34177
Replies: 8 comments 10 replies
-
Did you come across this documentation article? |
Beta Was this translation helpful? Give feedback.
-
Hey @bryanidsts, can you enable logging and share what comes out? |
Beta Was this translation helpful? Give feedback.
-
Are you using Have you tried using It will tell you what are the required Also, when you say |
Beta Was this translation helpful? Give feedback.
-
@cgillum I tried your method from here but it just returned |
Beta Was this translation helpful? Give feedback.
-
@billwert @baywet @vhvb1989 thank you all so much for your help, it was very nice to have some of the Microsoft team helping me through this headache. I now fully understand what’s going on here and have explained it all in a feature request for the Java graph sdk. Thanks again! |
Beta Was this translation helpful? Give feedback.
-
It sounds like you're having trouble with authentication while using Azure App Service Easy Auth with Microsoft Graph API in your Java app. Since you're able to call the Try using ClientSecretCredential or InteractiveBrowserCredential if you're using a client app with client credentials flow. Alternatively, for on-behalf-of authentication, OnBehalfOfCredential should work, but ensure your app is properly configured with the necessary permissions in Azure AD. Additionally, ensure that the token you’re using for For reference, you could try a simple flow with NBI CLEARANCE token validation in your app first to troubleshoot. |
Beta Was this translation helpful? Give feedback.
-
I'm trying to call GraphServiceClient from a java web app in an azure app service using easy auth. I can call https://graph.microsoft.com/oidc/userinfo with Bearer [x-ms-token-aad-access-token] and it works fine. I've tried DefaultAzureCredential, OnBehalfOfCredential, and AuthorizationCodeCredention, all just throw the error "Error executing the request". Can someone point me in the right direction? @g2vinay @billwert @alzimmermsft @vhvb1989 @baywet
Beta Was this translation helpful? Give feedback.
All reactions