# Issue in configuring Okta API Scopes

**URL:** <https://devforum.okta.com/t/issue-in-configuring-okta-api-scopes/15550>\
**Category:** OAuth/OIDC\
**Created:** [August 17, 2021, 11:46am UTC](https://devforum.okta.com/t/issue-in-configuring-okta-api-scopes/15550 "2021-08-17T11:46:58Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![hasnian](https://avatars.discourse-cdn.com/v4/letter/h/a9a28c/32.png) [@hasnian](https://devforum.okta.com/u/hasnian)\
**Post date:** [August 17, 2021, 11:46am UTC](https://devforum.okta.com/t/issue-in-configuring-okta-api-scopes/15550/1 "2021-08-17T11:46:58Z")

</div>

Hi!

I’m trying to implement a users creation module in my application that will call {api/v1/users} api endpoint of okta.  
As far as I have studied the documentation, it says to use {api\_key} for requesting {api/v1/users} endpoint. The other method to call this end point is to grant {okta.users.manage} scope in Okta API Scope inside the application and request the access token, then use that token to call {api/v1/users} endpoint and it will let you create/get all your current users in org.

As for the efficiency my requirement lies in the second option to grant Okta API Scope and use access token to call these endpoints but when i use this access token it gives {401 unauthorized} and {one or more scope is not configured to the application}, although i have granted access to {okta.users.manage & okta.users.read}.

Note: while working with {api\_key} every endpoint works smoothly. I wanted the other way, an Access token way to create or list users.

authorization url : [https://dev-36911734.okta.com/oauth2/default/](https://dev-36911734.okta.com/oauth2/default/)

url or api/vi/users: [https://dev-36911734.okta.com/api/v1/users](https://dev-36911734.okta.com/api/v1/users)

Thanks

---

<div class="post-metadata">

**Author:** ![andrea](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/andrea/32/2172_2.png) [@andrea](https://devforum.okta.com/u/andrea)\
**Post date:** [August 17, 2021, 6:08pm UTC](https://devforum.okta.com/t/issue-in-configuring-okta-api-scopes/15550/2 "2021-08-17T18:08:31Z")

</div>

You cannot use tokens issued by a custom authorization server (such as default) to request Okta API Scopes or use against the Okta API endpoints, as documented in [our guide about OAuth for Okta](https://developer.okta.com/docs/guides/implement-oauth-for-okta/overview/). You must use the [Org Authorization Server](https://developer.okta.com/docs/concepts/auth-servers/#org-authorization-server) instead.

---

<div class="post-metadata">

**Author:** ![hasnian](https://avatars.discourse-cdn.com/v4/letter/h/a9a28c/32.png) [@hasnian](https://devforum.okta.com/u/hasnian)\
**Post date:** [August 26, 2021, 10:22am UTC](https://devforum.okta.com/t/issue-in-configuring-okta-api-scopes/15550/3 "2021-08-26T10:22:10Z")

</div>

Thank you soo much. I have figured that out before and was unable to find this ticket page. Thank you again for your help. Now I’m having another issue about single sign on. should i create another ticket for it?

---

<div class="post-metadata">

**Author:** ![andrea](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/andrea/32/2172_2.png) [@andrea](https://devforum.okta.com/u/andrea)\
**Post date:** [August 26, 2021, 3:17pm UTC](https://devforum.okta.com/t/issue-in-configuring-okta-api-scopes/15550/4 "2021-08-26T15:17:41Z")

</div>

Yup, please create a new post to get assistance on your other issue so I can close this one out as solved.

---

<div class="post-metadata">

**Author:** ![hasnian](https://avatars.discourse-cdn.com/v4/letter/h/a9a28c/32.png) [@hasnian](https://devforum.okta.com/u/hasnian)\
**Post date:** [August 27, 2021, 7:53am UTC](https://devforum.okta.com/t/issue-in-configuring-okta-api-scopes/15550/5 "2021-08-27T07:53:34Z")

</div>

Alright. I have posted another question for SSO. and marked your answer as the solution. Kindly have a look to the next topic i posted and guide me accordingly as soon as possible because I’m on a tough time deadline.  
thank you

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/oktadev/original/1X/589c4c5f80de422d01f47cee7185a7fb8227835c.png) [@system](https://devforum.okta.com/u/system)\
**Post date:** [August 28, 2021, 7:53am UTC](https://devforum.okta.com/t/issue-in-configuring-okta-api-scopes/15550/6 "2021-08-28T07:53:41Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
