API Mastered Attribute Skip to main content
How satisfied are you with the Okta Help Center?
Thank you for your feedback!
How satisfied are you with the Okta Help Center?
Very Dissatisfied
Very satisfied
Enter content less than 200 characters.
Ask Search:
Michael SmithMichael Smith 

API Mastered Attribute

Via the API how can I determine how a user is currently mastered (eg AD vs Okta).

I am using PowerShell and Okta.Core.Automation.

Matthew McNabbMatthew McNabb

Not entirely sure if this is accurate, but you can look at the credentials property of the user returned by Get-OktaUser:
$User = Get-OktaUser


VictorVictor (Okta, Inc.) 

Hi Michael!

You will have to use the commands attached by Matthew! Here is an example from the JSON response with some masters as an example:

Okta Mastered user:
 "credentials": {
            "provider": {
                "type": "OKTA",
                "name": "OKTA"

AD Mastered user:
        "credentials": {
            "provider": {
                "type": "ACTIVE_DIRECTORY",
                "name": "victorsuciu.com"

LDAP Mastered user:
"credentials": {
            "provider": {
                "type": "LDAP",
                "name": "cn=admin,dc=taz,dc=gg"
Please ensure this information by retrieving a list with all users using GET {{url}}/api/v1/users. For Salesforce mastered user, in my JSON response credentials (type, name) are offered by Okta. If you only have Okta and AD, your report generated with PS script should fine by using the property Matthew attached.

Michael SmithMichael Smith
Thanks guys, this was exactly it! :)

Example below for posterity:

PS C:\> $oktaUser = Get-Oktauser "[USER1]"
PS C:\> $oktaUser.Credentials.Provider.type

PS C:\> $oktaUser = Get-Oktauser "[USER2]"
PS C:\> $oktaUser.Credentials.Provider.type