
e9jc4 (e9jc4) asked a question.
Hi,
In okta preview when I include the scope "okta.groups.read", it rejects the authorization request. I have already "granted" in the application's "Okta Api scopes". I tried creating a custom authorization server but there too I can't not add this scope. I hoping this would't be the issue in the production but I wanted to test on my dev box. I am a Cision employee which is your client, please help.
Thanks,
PS

I think for Authorization, you should also create the "Access Policy" for that client. In the "Access Policy" add that custom scope. That should work even in the preview account. I have tested that.
I also tried that too. I added Access Policy => Rule. In the Add Rule "Any Scopes" does not seems to include that particular scope "okta.groups.read" neither I can add it manually.
Can you try this ?
I don't see Require user consent in Edit Scope of default as well as my custom authorization servers. I also added my dev preview url in the screen shot in case that make a difference.
Thanks Sandeep, I think I should not use "okta.groups.read" scope in the authentication. I wanted to access /api/v1/users/{userId}/groups endpoint with the token after authentication.
I was in the direction(thinking) that okta Groups resource is owed by logged-in user which probably not true. Groups resource is probably owned by the organization, so logged-in token never supposed to access above endpoint. May be this is the reason why okta rejects the authentication process, (says invalid scope) after I included this scope otherwise works fine. Now I can access Groups resources by using a service account token generated by okta admin API => Tokens => Create Token. I think is the right path to access Groups.
Thanks you once again for your help and replies
Thanks
PS
Ohh ok. that is the case. well You can access any EndPoint of the OKTA using the Token. Remember that the Token is of type Bearer Token so anyone who is having that token, can access to your OKTA resources. Its good to create that token with API administrator Role & use that only for API access management. Just a tip !!