Hi,
There are 2 issues seen while issuing token from Azure AD OAuth2.0 as below:
Following apps are registered in AD:
Product-A with Scopes: product:A:view, product:A:edit
Product-B with Scopes: product:B:view, product:B:edit
****Issue 1: All scopes from a single app gets included in the token, even if the request is for one scope only.****
Suppose, Client app is added with both Product-A scope product:A:edit and product:A:view .
If a token is requested with product:A:view scope, the token response contains all the scopes from the Product-A, i.e. both product:A:view and product:A:edit scopes are assigned to the token.
Basically, scope is not acting as a filter.
Issue 2: Scope included only from one app, even if the request is for multiple scopes from different apps.
Suppose, Client app is added with both Product-A scope product:A:edit and Product-B scope product:B:view
If a token is requested with both product:A:edit and product:B:view, the issued token contains the scope of only one app (app-id whose scope appears first on the scope parameter of token endpoint api) for e.g. only product:A:edit is assigned to the token.
Are these known issues or is something missing in the configuration. Any help is appreciated?