Azure-Samples / ms-identity-java-webapp

A Java web application calling Microsoft graph that is secured using the Microsoft identity platform
MIT License
118 stars 105 forks source link

Same solution on premise hosted AD? #67

Closed keyhan closed 3 years ago

keyhan commented 3 years ago

Working in a big company with its own AD servers you want to sometimes use authentication authorization and oauth2, the same mechanism that you show here for Azure AD.

I have tried to find a documented solution but ave not been able to, so the question is if this solution would work on premise if not then do you have a tip where to look?

sangonzal commented 3 years ago

@keyhan Are the on premise AD servers running ADFS2019? If so, then yes.

The only thing that really changes is the authority value that you pass in when you create your ConfidentialClientApplication object. You can get this value from your app registration in in ADFS. It should look something like https://adfs.contoso.com/adfs

A bit more about ADFS support in MSAL4J

Avery-Dunn commented 3 years ago

Closing due to inactivity, and it seems like the question's been answered. If you have any more questions, feel free to reopen this thread or leave a comment.