0

I am trying to do fetch email using azure through my app.I am not able to configure the adal4j to the Spring MVC app. I tried updating to java 1.8 still the issue persists. Method 2-Also,I execute a separate boot application with the below properties and found reply URL issue.I tried both Spring boot with different versions of java.I also tried spring version with java 1.6 and 1.8 Message: AADSTS50011: The reply url specified in the request does not match the reply urls configured for the application

Here are application configuration details -

<org.aspectj-version>1.6.10</org.aspectj-version>

<java-version>1.6</java-version>

<org.springframework-version>3.1.1.RELEASE</org.springframework-version>

<org.slf4j-version>1.6.6</org.slf4j-version>

I am not able to configure the adal4j to the Spring MVC app. I tried updating to java 1.8 still the issue persists.

com.microsoft.azure

adal4j

1.6.0

1 Answers1

1

You have to pass in the same redirectUri to acquireTokenByAuthorizationCode() that is registered on the Azure application registration portal.

You can check what redirectUri is registered by going to portal.azure.com, searching for Azure Active Directory, then App Registrations, then click on the your app registration, and then on Authentication. You should then be able to register your redirectUri

For detailed instructions on how to register an application on the app registration portal (including redirectUri), and how to configure a spring application, take a look at Active Directory Java web app sample.

One last thing: Microsoft Authentication Library of Java (MSAL) is in preview now, and it is recommended that people stop using ADAL and move to MSAL for new projects. MSAL also has a web sample with instructions on how to register the application and configure your spring app.

sgonzalez
  • 741
  • 6
  • 20