<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
0D54z00009Dlp4hCABOkta Classic EngineIntegrationsAnswered2023-05-29T17:01:20.000Z2023-05-26T20:41:46.000Z2023-05-29T17:01:20.000Z

TudorM.83509 (Customer) asked a question.

Programmatically get Okta Tokens through a custom IDP

We have a multi-tenant application. By default, tenants use our Okta organization. Some tenants want to bring their Azure AD credentials. We've setup Azure AD (single tenant) as a custom IDP in Okta. All works well.

 

For tenants that use Okta directly, I've setup automated tests to check that newly created Users get proper access to our application. I've done this by using Resource Owner Password flow to issue tokens from Okta for dynamically created users. All great.

 

Here's the problem. I want to do the same kind of tests for users in Azure AD. I want to programmatically issue Okta tokens for users in Azure AD. Creating users in Azure AD is not a problem. Getting Id Tokens or Access Tokens from Azure AD (using the same App Registration that is linked to the Okta Custom Idp) is not a problem.

 

I don't understand how am I to go about this.

  • Is there a way to exchange the Id Token or Access Token issued by Azure AD with one issued by Okta? To my understanding, this is a different thing that using On-Behalf-Of token exchange, since the API (Resource) is the same.
  • Is there a way to use Code flow in Azure AD and have it redirect to some Okta endpoint ? (this sounds a bit SF to me)
  • Am I going the wrong way about this ?
  • I could do this via UI Tests but I would really like to avoid that, since I don't want to test Okta features, I want to test that users are linked properly between Okta and our App.

 

Thanks.


  • User16525970288336564155 (MFA and Devices)

    Hello. First of all, thank you for your post! It greately helps with adding visibility to the community.

     

    Since this request is very custom, and we don't have an already existing solution for it, I would suggest to open a ticket to Okta Support if the help from the Okta Community will not be enough.

     

    Thanks!

    Expand Post
This question is closed.
Loading
Programmatically get Okta Tokens through a custom IDP