<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
0D54z00009GYZRkCAPOkta Classic EngineAPI Access ManagementAnswered2023-06-07T15:41:10.000Z2023-06-06T22:02:44.000Z2023-06-07T15:41:10.000Z

HoangT.98235 (Customer) asked a question.

Username was changed in AD and I need to applied the new username in Okta. How to bulk update application list to a user via API?

I'm able to retrieve a list of apps from a user from this thread https://support.okta.com/help/s/question/0D50Z00008C3jTNSAZ/how-to-retrieve-application-list-assigned-to-user-using-okta-api?language=en_US

 

Since the username changed, I need to be able to bulk update the new username to the existing app list. Via above example in the body, I've find and replace all of the old username with the new ones, then ran the API POST method and got the below

 

{

    "errorCode": "E0000003",

    "errorSummary": "The request body was not well-formed.",

    "errorLink": "E0000003",

    "errorId": "oaeHi5lFRQvQleAcHtH3UkKoQ",

    "errorCauses": []

}

 

How to bulk update application list to a user via API?


  • DonF.81354 (Customer)

    Hi! May I ask what API call you made to get the above error? Also, interestingly enough, I ran into this in the last 6 months or so and that prompted me to a support ticket. I was informed that using "Custom" for the "Application username format" will actually auto-update the username, whereas using, say, "Okta Username", will not.

     

    Based on my own experience, this has been true. I just checked for a user who underwent a name change just last week and the same is true today. The app that is using a custom mapping has been changed, the one using a pre-selected option did not.

     

    @Mihai Negoita - Okta (Okta, Inc.)​ any thoughts on why that is?

     

    For all, I can share the details of that ticket as well just in case. The case essentially spoke to this article:

     

    Application Usernames Are Not Being Updated Automatically

     

     

    I hope this helps! Hopefully this resolves the future need to do the above. Thanks again

     

     

     

     

    Expand Post
    Selected as Best
  • DonF.81354 (Customer)

    Hi! May I ask what API call you made to get the above error? Also, interestingly enough, I ran into this in the last 6 months or so and that prompted me to a support ticket. I was informed that using "Custom" for the "Application username format" will actually auto-update the username, whereas using, say, "Okta Username", will not.

     

    Based on my own experience, this has been true. I just checked for a user who underwent a name change just last week and the same is true today. The app that is using a custom mapping has been changed, the one using a pre-selected option did not.

     

    @Mihai Negoita - Okta (Okta, Inc.)​ any thoughts on why that is?

     

    For all, I can share the details of that ticket as well just in case. The case essentially spoke to this article:

     

    Application Usernames Are Not Being Updated Automatically

     

     

    I hope this helps! Hopefully this resolves the future need to do the above. Thanks again

     

     

     

     

    Expand Post
    Selected as Best
    • HoangT.98235 (Customer)

      Hi Don,

       

      Honestly, I don't know if the below API is supported. I just took the API from the above link and change the GET to a POST with the updated body. Here is the API (stripped off the uid and tenant)

       

      POST https://myorg-sandbox.okta.com/api/v1/apps?filter=user.id+eq+"my-okta-uid"&expand=user/my-okta-uid

       

      Body

      the updated body from the GET result

       

      Thanks,

      Hoang

      Expand Post
    • Hi @HoangT.98235 (Customer)​ , Thank you for reaching out to the Okta Community!

       

      @DonF.81354 (Customer)​  is right, you'll need to configure the apps as mentioned in the article for now. 

      The API would only allow you to pull the app list but not to update them, unfortunately.  

       

      There is an Okta Idea currently pending review for possible future enhancements.  

      You can check it out and upvote it here to increase the chances of it to being deployed.  

       

       

      Hope my answer helps! 

      --------------------------------

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

      Expand Post
This question is closed.
Loading
Username was changed in AD and I need to applied the new username in Okta. How to bulk update application list to a user via API?