0D51Y00008W4LEWSA3Okta Classic EngineAdministrationAnswered2024-03-26T00:28:00.000Z2020-05-21T11:41:48.000Z2020-05-22T08:40:09.000Z

e9jc4 (e9jc4) asked a question.

Okta preview account's scope(okta.groups.read) issue

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


  • sandeepk.84743 (Wipro Technologies)

    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.

  • e9jc4 (e9jc4)

    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.

     

    Image is not available

    

    Image is not available

    Expand Post
  • sandeepk.84743 (Wipro Technologies)

    Can you try this ?

     

    1. To enable consent for the scopes that you want to require consent for, select API, Authorization Servers, and then select default (Custom Authorization Server) in the table. In this example, we are enabling consent for default Custom Authorization Server scopes.
    2. Select the Scopes tab.
    3. Click the edit icon for the phone scope. The Edit Scope dialog box appears.
    4. Select Require user consent for this scope and click Save.

     

    Expand Post
  • e9jc4 (e9jc4)

    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.

     

    Image is not available

    Expand Post
  • e9jc4 (e9jc4)

    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

    Expand Post
  • sandeepk.84743 (Wipro Technologies)

    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 !!

This question is closed.

Recommended content

No recommended content found...