Skip to content

Assign a linked object value for primary

Request

CORS
OAuth 2.0 scope:
  • okta.users.manage

Assigns the first user as the associated and the second user as the primary for the specified relationship.

If the first user is already associated with a different primary for this relationship, the previous link is removed. A linked object relationship can specify only one primary user for an associated user.

Path
userIdOrLoginstringrequired

If for the self link, this is the ID of the user for whom you want to get the primary user ID. If for the associated relation, this is the user ID or login value of the user assigned the associated relationship.

This can be me to represent the current session user.

Examples:
Example ID of `primary`
00u5zex6ztMbOZhF50h7
Example ID of `associated`
00u5zex6ztMbOZhF50h7
primaryRelationshipNamestringrequired

Name of the primary relationship being assigned

Example:manager
primaryUserIdstringrequired

User ID to be assigned to the primary relationship for the associated user

curl -i -X PUT \
  'https://subdomain.okta.com/api/v1/users/00u5zex6ztMbOZhF50h7/linkedObjects/manager/{primaryUserId}'

Responses

Success

Response
No content