Hi @Akanksha Pandey ,
Thanks for reaching out.
I understand you are looking to authenticate using Spring Boot Starter and getting error in the ID-Token.
As per documentation you mentioned, this is basic lab to introduced spring boot classes and annotations.
The error you are getting is due to invalid audience in the token. The audience of a token is the intended recipient of the token. In this particular documentation we are not calling any graph or protected API, so we are not specifying any scope in the application. Properties.
If you are calling any Graph API or protected API after authenticating the user, then the valid scope needs to add in the application to access the API.
eg scopes: https://graph.microsoft.com/User.Read need to add to access Graph API to read user details.
Could you please confirm if you are passing any scope in your application or while authenticating using postman?
I tried to replicate the given steps as mentioned in document in my lab and able to call message mentioned in controller successfully.
Hope this will help.
Thanks,
Shweta
------------------------
Please remember to "Accept Answer" if answer helped you.