Hi,
My requirement is simple:
My application wants the list of groups that a user in Okta belongs to.
So for this, I have çreated a Service App in Okta, got the client_id and client_secret, and I am generating an access token for this app using grant_type as “client_credentials”.
The following is how my request looks like:
POST:
https://dev-584125.oktapreview.com/oauth2/default/v1/token?grant_type=client_credentials&scope=IVCustomScope&client_id=<client_id_here>&client_secret=<client_secret_here>
If you notice if we dont give a scope the call fails ( as default scope is not supported for client_credentials grant type).
So I define a custom scope under default authorization server, and I associate a claim type to this scope. Here is the screenshot of the claim that I created
Now if I use the above generated access token, and try hitting the following API:
https://dev-584125-admin.oktapreview.com/api/v1/users/00ujkz9360E9rtyhO0h7/groups
I receive 403 Forbidden Error. Here is the screenshot:
I am sure it is related to some scope settings, which I am unable to fix. And why are the default scopes not working/supported for client_credentials grant type. Please help.
Thanks,
Ram