I have an application granted some products and some of these products have some scopes.
I expected when query the application details using Apigee management API to retrieve all the scopes associates with all granted products, However I got an empty scopes !!!
Any Advise ?
I agree, the docs here https://cloud.google.com/apigee/docs/api-platform/security/oauth/working-scopes#howarescopesassigned... imply the App will have all the scopes for the products, but they are not shown on the App itself. However, when you create an access token for that App, the token will have all the scopes. You can request less scopes in the OAuth token generation call, but with none, you'll get all scopes.
Now, if you create an App with certain scopes (via the API), they are listed in the App and OAuth tokens created for that App will be restricted to those scopes.
Bottom line, even though the App does not show any scopes when created in the UI, it has the ability to request any of the scopes available in the API Products for the App, in an OAuth token.