<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
0D54z00009ztwQoCAIOkta Classic EngineDirectoriesAnswered2024-03-11T12:07:08.000Z2024-02-12T15:41:51.000Z2024-03-11T12:07:08.000Z

StevenY.58531 (Customer) asked a question.

Assistance Changing Active Directory Provider with Okta API

We are working on developing some API calls to improve automation of tasks but I cannot find how to modify the active directory provider for a user. For example, we have a user who is on old-domain.local, and new-domain.local. Both domains are in the same Okta instance with delegated AD auth, with old-domain.local having the higher profile source. 

 

We have imported and merged the user from both Active Directory sources so the object is associated with both AD instances.

 

However, if I do a GET on that User, the JSON only returns the provider for the higher priority domain, example:

 "profile": {

    "firstName": "Emily",

    "lastName": "Johnson",

    "mobilePhone": null,

    "displayName": "Emily Johnson",

    "secondEmail": null,

    "login": "emily.johnson@new-domain.com",

    "email": "emily.johnson@original-domain.com"

  },

  "credentials": {

    "provider": {

      "type": "ACTIVE_DIRECTORY",

      "name": "original-domain.local"

    }

 }

 

If I make an API call to pass JSON to try and change that to new-domain.local, it never updates even though the command doesn't fail. If I disconnect the user from AD in the GUI, it removes them from the first instance (original domain) but leaves them connected properly to the new-domain.local. 

 

However, I noticed that when removing it the log shows 

 

"Feb 12 10:04:42

Steven Yurgelevic (User)

Remove user's application membership

SUCCESS

Emily Johnson (AppUser)

Active Directory (AppInstance)

1 more targets"

 

 

So my questions are the following:

1. If I have a merged user who is tagged back to both AD instances, how can I do a GET via API call either in Postman or via Python to have it list ALL of the providers, not just the priortiy?

 

2. MORE IMPORTANT: How can I use the API calls to either remove the user from the original-domain.local AD instance like with the GUI trigger "Remove From Active Directory" or force it to use the new-domain.local? I think the former will solve the problem easier than the latter.

 

 

Thank You.


  • Paul S. (Okta, Inc.)

    Hello @StevenY.58531 (Customer)​  Thank you for reacting out to our Community!

     

    For your first question, the API call will only show the highest Profile master of a user during the API call.

    For your second question, there is no API call that will change the Profile master of a user at this time.

    However you can add a Feature Request on our Idea section, for a chance that this functionality to be added in the future.

    https://support.okta.com/help/s/ideas

     

    Community members help others by clicking Like or Select as Best on responses. Try it today.

     

    Earn Today: New Okta Community Badges Have Arrived

     

    Ask the experts about Okta Privileged Access

    Expand Post
  • StevenY.58531 (Customer)

    Thank you, I found that it treats active directory like apps so I can remove the profile sourcing for the account and then import match from the correct AD for import.

This question is closed.
Loading
Assistance Changing Active Directory Provider with Okta API