Skip to main content

idp_users

Creates, updates, deletes, gets or lists an idp_users resource.

Overview​

Nameidp_users
TypeResource
Idokta.idps.idp_users

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringUnique key of the user
_embeddedobjectEmbedded resources related to the IdP user
_linksobjectSpecifies link relations (see Web Linking) available using the JSON Hypertext Application Language specification. This object is used for dynamic discovery of related resources and lifecycle operations.
createdstring (date-time)Timestamp when the object was created (example: 2016-01-03T18:15:47.000Z)
externalIdstringUnique IdP-specific identifier for the user (example: saml.jackson@example.com)
lastUpdatedstring (date-time)Timestamp when the object was last updated (example: 2016-01-03T18:15:47.000Z)
profileobjectIdP-specific profile for the user. IdP user profiles are IdP-specific but may be customized by the Profile Editor in the Admin Console. > Note: Okta variable names have reserved characters that may conflict with the name of an IdP assertion attribute. You can use the External name to define the attribute name as defined in an IdP assertion such as a SAML attribute name.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_identity_provider_application_userselectidpId, userId, subdomainRetrieves a linked identity provider (IdP) user by ID
list_identity_provider_application_usersselectidpId, subdomainq, after, limit, expandLists all the users linked to an identity provider (IdP)
unlink_user_from_identity_providerdeleteidpId, userId, subdomainUnlinks the Okta user and the identity provider (IdP) user. The next time the user federates into Okta through this IdP, they have to re-link their account according to the account link policy.
link_user_to_identity_providerexecidpId, userId, subdomainLinks an Okta user to an existing SAML or social identity provider (IdP).

The SAML IdP must have honorPersistentNameId set to true to use this API.
The Name Identifier Format of the incoming assertion must be urn:oasis:names:tc:SAML:2.0:nameid-format:persistent.

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
idpIdstringid of IdP
subdomainstring(default: my-org)
userIdstringID of an existing Okta user
afterstringThe cursor to use for pagination. It is an opaque string that specifies your current location in the list and is obtained from the Link response header. See Pagination and Link header.
expandstringExpand user data
limitintegerA limit on the number of objects to return
qstringSearches the records for matching value

SELECT examples​

Retrieves a linked identity provider (IdP) user by ID

SELECT
id,
_embedded,
_links,
created,
externalId,
lastUpdated,
profile
FROM okta.idps.idp_users
WHERE idpId = '{{ idpId }}' -- required
AND userId = '{{ userId }}' -- required
AND subdomain = '{{ subdomain }}' -- required
;

DELETE examples​

Unlinks the Okta user and the identity provider (IdP) user. The next time the user federates into Okta through this IdP, they have to re-link their account according to the account link policy.

DELETE FROM okta.idps.idp_users
WHERE idpId = '{{ idpId }}' --required
AND userId = '{{ userId }}' --required
AND subdomain = '{{ subdomain }}' --required
;

Lifecycle Methods​

Links an Okta user to an existing SAML or social identity provider (IdP).

The SAML IdP must have honorPersistentNameId set to true to use this API.
The Name Identifier Format of the incoming assertion must be urn:oasis:names:tc:SAML:2.0:nameid-format:persistent.

EXEC okta.idps.idp_users.link_user_to_identity_provider
@idpId='{{ idpId }}' --required,
@userId='{{ userId }}' --required,
@subdomain='{{ subdomain }}' --required
@@json=
'{
"externalId": "{{ externalId }}"
}'
;