Users have relationships to each other, like manager and subordinate or customer and sales representative. You can create users with relationships by using the Linked Objects API to represent the relationship.
primary attribute and an associated attribute.primary and one associated user.For each relationship:
primary link (a user has a single manager), but can have many associated links (a user can have many subordinates).primary in one relationship and the associated in another.primary and associated in the same relationship.Okta Expression Language function for linked objects provides access to the details about a linked user.
Note: The linked objects feature isn't available for OpenID Connect claims.
Okta allows you to create up to 200 linked object definitions. These definitions are one-to-many, for example:
Most orgs have more than one manager or sales representative. You can create the linked object definition once, and then assign the primary relationship to as many users as you have people in that relationship.
You can assign the associated relationship for a single primary user to as many users as needed. The associated user can be related to only one primary per linked object definition. But you can assign a user to more than one linked object definition.
For example, assume that you've created one linked object definition for manager (primary) and for subordinates (associated):
Thus, you can create chains of relationships (Jane > Bob > Joe > Frank) or terminal relationships (Jane is both primary and associated user).
Then, if you create another linked object relationship for scrum team membership, you could assign relationships to the same four users:
Bob can be the primary for a Manager:Subordinate, an associated user for that same linked object definition, and also the primary for the Scrumlead:Contributor linked object definition.
To represent a relationship, create a linked object definition that specifies a primary (parent) relationship and an associated (child) relationship, and then add a link in which the appropriate user is assigned to each side of that link type.
If you created multiple user types (see User Types), they all share the same linked object definitions. For example, if you have separate user types for employees and contractors, a link could designate an employee as the manager for a contractor, with the contractor being a subordinate of that employee.
Link definition operations allow you to manage the creation and removal of the link definitions. If you remove a link definition, links based on that definition are unavailable.
Note: Links reappear if you recreate the definition. However, Okta is likely to change this behavior so that links don't reappear. Don't rely on this behavior in production environments.
Lists all Linked Object definitions
Success
Forbidden
Too Many Requests
[- {
- "primary": {
- "name": "manager",
- "title": "manager",
- "description": "Manager link property",
- "type": "USER"
}, - "associated": {
- "name": "subordinate",
- "title": "subordinate",
- "description": "Subordinate link property",
- "type": "USER"
}, - "_links": {
}
}
]Creates a Linked Object definition
object (LinkedObjectDetails) | |||||||||||||
object (LinkedObjectDetails) | |||||||||||||
| |||||||||||||
object (LinkedObjectLinksSelf) Specifies link relations (see Web Linking) available for the current status of an application using the JSON Hypertext Application Language specification. This object is used for dynamic discovery of related resources and lifecycle operations. | |||||||||||||
Created
Bad Request
Forbidden
Conflict
Too Many Requests
{- "primary": {
- "name": "manager",
- "title": "manager",
- "description": "Manager link property",
- "type": "USER"
}, - "associated": {
- "name": "subordinate",
- "title": "subordinate",
- "description": "Subordinate link property",
- "type": "USER"
}
}{- "primary": {
- "name": "manager",
- "title": "manager",
- "description": "Manager link property",
- "type": "USER"
}, - "associated": {
- "name": "subordinate",
- "title": "subordinate",
- "description": "Subordinate link property",
- "type": "USER"
}, - "_links": {
}
}Retrieves a Linked Object definition
Success
Forbidden
Not Found
Too Many Requests
{- "primary": {
- "name": "manager",
- "title": "manager",
- "description": "Manager link property",
- "type": "USER"
}, - "associated": {
- "name": "subordinate",
- "title": "subordinate",
- "description": "Subordinate link property",
- "type": "USER"
}, - "_links": {
}
}Deletes the Linked Object definition specified by either the primary or associated name. The entire definition is removed, regardless of which name that you specify.
No Content
Forbidden
Not Found
Too Many Requests
{- "errorCode": "E0000006",
- "errorSummary": "You do not have permission to perform the requested action",
- "errorLink": "E0000006",
- "errorId": "sampleNUSD_8fdkFd8fs8SDBK",
- "errorCauses": [ ]
}