<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
0D54z00007fWv3KCASOkta Classic EngineAuthenticationAnswered2022-05-25T16:21:25.000Z2022-05-24T15:14:29.000Z2022-05-25T16:21:25.000Z

BaptisteO.15054 (Customer) asked a question.

Use Core Okta API with a Custom Authorization Server

Hello !

 

I made an OAuth 2.0 connection with "okta-auth-js", going through a Custom Authorization Server. But now I would like to make a request to the Okta API ('https://xxxx/api/v1/apps/xxxx/groups') using an access token ('Authorization': 'Bearer xxxxx'). But I can't do this since I did not connect with the Org Authorization Server, which is the only one able to make requests to the Okta API.

 

So is there a way to get an access token from the Org Authorization Server, without reconnecting? Or another way to access the Okta API (which is not with API Tokens)?

 

Thank you very much ! :D


  • Paul S. (Okta, Inc.)

    Hello @BaptisteO.15054 (Customer)​  Thank you for reaching out to our Community!

     

    You cannot request Okta API scopes using custom authorization server but has to be retrieved through org auth server. If this functionality is desired, you can request a second token using org auth server and use that for any calls made to Okta API. Since they use 

    okta-auth-js you can use storageKey to maintain two instances of Okta client for this. And use getWithoutPrompt to use existing okta session.

     

    My advice would be to leverage the Okta Developer forums for this type of questions and take advantage of their expertise.

    https://devforum.okta.com/

    Expand Post
This question is closed.
Loading
Use Core Okta API with a Custom Authorization Server