API Mastered Attribute Skip to main content
https://support.okta.com/help/answers?id=9062a000000quqiqak&refurl=http%3a%2f%2fsupport.okta.com%2fhelp%2fanswers
How satisfied are you with the Okta Help Center?
Thank you for your feedback!
How satisfied are you with the Okta Help Center?
1
2
3
4
5
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.

Thanks!
Matthew McNabbMatthew McNabb
Michael,

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

$User.Credentials.Provider.type

 
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
OKTA

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