I have a number of angularJS application that access a number of nodeJS hosted API's. and I would like to replace the bespoke authorization framework with Azure AD implicit grant (long story how I arrived there ..)
Currently going through a POC (based on Microsoft example ) and have hit a problem with obtaining a single access token to be used against number of API's
Both ui's and API's have been registered with AZURE AD Application. Also have configured a number of permissions so they are authorized to call the API's e.g. https://graph.windows.net/User.Read
api://xxx-xxx-xxxx-xx-xxxx/sales.admin
I then define in the client
var requestObj = {
scopes: ["https://graph.windows.net/User.Read", "api://xxx-xxx-xxxx-xx-xxxx/sales.admin" ]
};
So naively I thought I will be able to get an access token that I can use against multiple API's
However, looks like that is not the case. The client app has to create separate access tokens for each API the application needs to access.
Is this right ? This adds lot's of complexity on the client as it needs to maintain and refresh those tokens.
Am I missing something on the 'architecture' e.g. API Management layer ?
Thanks
Nick