Hi @Ansamma Thomas ,
Thanks for reaching out.
I understand you are trying to call webAPI 1 (using v2 endpoint) to call webAPI 2(using v1 endpoint) and getting error while passing appIdUrl/.default in scope.
This is expected as when you use the appId/.default
scope, MSAL uses the v1 endpoint to acquire a token for the resource. However, when you use the appIdUrl/.default
scope, MSAL uses the v2 endpoint to acquire a token for the resource.
Here you want to acquire a token for all the static scopes of a v1.0 application which requires appIdURL of the API when calling the v1 endpoint.
The reason you are getting an invalid scope error when using appIdUrl/.default
is that the v1 endpoint does not recognize the appIdUrl
format.
So, to summarize, if you are calling a v1 endpoint, you should use the appId/.default
scope, and if you are calling a v2 endpoint, you should use the appIdUrl/.default
scope.
https://learn.microsoft.com/en-us/azure/active-directory/develop/msal-v1-app-scopes
Hope this will help.
Thanks,
Shweta
Please remember to "Accept Answer" if answer helped you.