question

RadhaRajendran-2501 avatar image
0 Votes"
RadhaRajendran-2501 asked RadhaRajendran-2501 edited

Token validation failed

Hi Team

I am trying below example.

https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/spring/azure-spring-boot-samples/azure-spring-boot-sample-active-directory-resource-server

I have registered one web API and client API. In client API i have added the scope of web API.

Now i generated the token using user name and password for client api and when i tried to pass the generated token to web api and i am getting 401 unAuthorized.

Any leads would be appreciate.

azure-active-directory
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

MarileeTurscak-MSFT avatar image
0 Votes"
MarileeTurscak-MSFT answered RadhaRajendran-2501 edited

Hi @RadhaRajendran-2501,

There are a number of things that can cause this error. Please make sure you have entered the correct TenantID, ApplicationID and Application_Secret, and the Group name in the application.properties file under src/main/resources

I would also check some of the solutions in these related threads:

Access Token Response Unauthorized
Unable to Authenticate Using Spring Boot Sample
Invalid Token Response
Token is not Authorized immediately

If you still have this issue, please provide any trace logs you may have, along with a screenshot of the API permissions that you have added.

[5]: https://en.wikipedia.org/wiki/Network_Time_Protocol

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@MarileeTurscak, Thank you for the response. You can find the details in the document attached

83371-demo-web-api-demo-client-api-converted.pdf


0 Votes 0 ·