Closed navi-dev closed 5 years ago
navi-dev you need to call acquireToken(url) to get your access token. Have you tried that? Or do you have MFA enabled?
nani-dev - looks like your API would need to white-list the audience for which you are generating the token. Also your API must validate the token against the same audience that your client is generating the token for.
Hi I have the same issue. I have tried multiple ways in acquireToken(url), But it still return the same access token that I could not pass to API.
I decode the token I get the property "aud" is always Angular ClientId that was supposed to be WebAPI ClientAPI instead.
Does anyone get this done with 2 apps: 1 Angular and 1 Web API ?
Thanks
I have been trying to integrate the ADon my SPA and API project. I am able to login to the SPA but when it comes to generate the access token and passing to the API it always say unauthorized.
Digging down I found that API says invalid audience. Even I try to decode the token the audience Id is the SPA app id not the API app id.
I am not sure where to change. To generate the access token I have done the following this.adal.acquireToken('app url'). this.adal.acquireToken('localhost api host'). this.adal.acquireToken('oauth token url').
But nothing seems to be working it seems its giving me the same id_token instead of access token.