<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
0D54z0000AKFZNiCQPOkta Classic EngineAdministrationAnswered2025-03-18T21:52:06.000Z2025-03-15T19:03:19.000Z2025-03-18T21:52:06.000Z
What Okta API would allow me to fetch list of all Okta Profile Attributes?

In admin UI go to Directory -> Profile Editor -> User (default) Okta Profile.

Here you see list of all Attributes.

 

I want to programmatically pull attributes list using http request. I don't need to code details but rather looking for Okta API Endpoint. I have tried the Schemas endpoint but none are working for me.


  • Kamlesh, Your List User API (User API) call should provide all the profile info (non null values) under the profile section in the response. HTH

  • @User16198266428895633157 (Customer)​ - I reread your post and you are following right approach (user->apps and appid)

     

    For the default user profile , you can try the "User Type API" and grab the ID (default)..

     

    if you have already tried that please ignore this mesg

    Expand Post
  • @BalaP.90849 (Okta)​ You said "For the default user profile , you can try the "User Type API" and grab the ID (default)" ...

    Can you help me understand this a bit more?

    1. I called "https://{okta_domain}/api/v1/meta/types/user"
    2. Response has 1 record in my case as I am using a trial version of Okta

    [

      {

        "id": "otypmjef2t8Ci6IGF697",

        "displayName": "User",

        "name": "user",

        "description": "Okta user profile template with default permission settings",

        "createdBy": "sprpmjef1gbm3m40X697",

        "lastUpdatedBy": "sprpmjef1gbm3m40X697",

        "created": "2025-03-12T20:25:33.000Z",

        "lastUpdated": "2025-03-12T20:25:33.000Z",

        "default": true,

        "_links": {

          "schema": {

            "rel": "schema",

            "href": "https://trial-xxxxxxx.okta.com/api/v1/meta/schemas/user/oscpmjef2t8Ci6IGF697",

            "method": "GET"

          },

          "self": {

            "rel": "self",

            "href": "https://trial-xxxxxxx.okta.com/api/v1/meta/types/user/otypmjef2t8Ci6IGF697",

            "method": "GET"

          }

        }

      }

    ]

     

    I have to now parse the response and grab the response[0]._links.schema.href where key = "response[0]._links.schema.rel = "schema". Grab the last part of the href after .../user/

     

    Is there a better way to get (via API call) a list of User schemas in Okta tenant?

    The above API call is to get User Types -- https://{okta_domain}/api/v1/meta/types/user

     

    -Take care

    Expand Post
  • Kamlesh , you got the above one right.

     

    if there was only default user type you could have got it with single api call to pull default okta attribiutes - https://trial-xxxxxxx.okta.com/api/v1/meta/schemas/user/default

     

    when you have multiple user types , you will have to pull all the user types and then grab their respective schema ID (like you have done above) .

    After that You may have to make an additional call to pull the respective schema attributes

     

    Hope this provides clarity

     

     

     

     

    Expand Post
  • @BalaP.90849 (Okta)​ I just confirmed that https://trial-xxxxxxx.okta.com/api/v1/meta/schemas/user/default returns default schema with custom and base attributes. This should be good for me.

     

    Question: Let's say I have multiple user types then will https://trial-xxxxxxx.okta.com/api/v1/meta/schemas/user/default still return default schema? Or error Or array of multiple Schema responses?

    I assume because I have API with .../user/default it would still return me the default user schema. If that is the case then it is guaranteed to return me response for any given Okta tenant.

     

    Correct?

    Once again thank you.

     

    Expand Post
  • As it sdtands, it will still return the default schema (Default okta user). I have 2 user types in my tenant and it returns the schema (Default)

     

    But for other user types you will have to pass schema id

10 of 11
This question is closed.
Loading
What Okta API would allow me to fetch list of all Okta Profile Attributes?