Get Bearer access_token for backend using EasyAuth in SPA
Hello,
I have Web App (SPA on React) that is using MSAL library to get access_token and make request to backend.
I need to apply EasyAuth for SPA to avoid transfer JS code to unauthenticated users.
From /.auth/me I am able to get access_token, but it conatins:
"aud": "00000003-0000-0000-c000-000000000000",
"scp": "Directory.Read.All profile User.Read User.Read.All openid email",
With this access_token I can't make a reqest to backend. In App registration I have assigned 'API permission' for backend.
There is no changes in 'scp' in access_token that I receive, even though I specify api://<app-id> in <Web App>->'Authentication'->'Edit identity provider'->'Allowed token audiences'.