List role assignments
GEThttps://sailpoint.api.identitynow.com/beta/identities/:identityId/role-assignments
This returns either a list of Role Assignments when querying with either a Role Id or Role Name, or a list of Role Assignment References if querying with only identity Id.
Request
Path Parameters
Identity Id to get the role assignments for
Query Parameters
Role Id to filter the role assignments with
Role name to filter the role assignments with
Responses
- 200
- 400
- 401
- 403
- 404
- 429
- 500
A role assignment object
- application/json
- Schema
- Example (auto)
Schema
- Array [anyOf
- MOD1
- MOD2
- ]
Assignment Id
1cbb0705b38c4226b1334eadd8874086
role object
Assignment Id
1cbb0705b38c4226b1334eadd8874086
role object
Comments added by the user when the assignment was made
I'm a new Engineer and need this role to do my work
Source describing how this assignment was made
UI
assigner object
assignedDimensions object[]
assignmentContext object
accountTargets object[]
Date that the assignment will be removed
Wed Feb 14 10:58:42
[
{
"id": "1cbb0705b38c4226b1334eadd8874086",
"role": {
"id": "ff8081814d977c21014da056804a0af3",
"name": "Github"
}
},
{
"id": "1cbb0705b38c4226b1334eadd8874086",
"role": {
"id": "ff8081814d977c21014da056804a0af3",
"name": "Github"
},
"comments": "I'm a new Engineer and need this role to do my work",
"assignmentSource": "UI",
"assigner": {
"id": "ff8081814d977c21014da056804a0af3",
"name": "Github"
},
"assignedDimensions": [
{
"id": "1acc8ffe5fcf457090de28bee2af36ee",
"type": "DIMENSION",
"name": "Northeast region"
}
],
"assignmentContext": {
"requested": {
"contextAttributes": [
{
"attribute": "location",
"value": "Austin",
"derived": false
}
]
},
"matched": [
{
"roleRef": {
"id": "e7697a1e96d04db1ac7b0f4544915d2c",
"type": "DIMENSION",
"name": "Engineer"
},
"matchedAttributes": [
{
"attribute": "location",
"value": "Austin",
"derived": false
}
]
}
],
"computedDate": "Wed Feb 14 10:58:42"
},
"accountTargets": [
{
"source": {
"id": "d18b74853739439986501ad180b27db6",
"type": "SOURCE",
"name": "Active Directory"
},
"accountInfo": {
"nativeIdentity": "CN=Abby Smith,OU=Austin,OU=Americas,OU=Demo,DC=seri,DC=acme,DC=com",
"displayName": "Abby.Smith",
"uuid": "{ad9fc391-246d-40af-b248-b6556a2b7c01}"
},
"roleName": "Marketing"
}
],
"removeDate": "Wed Feb 14 10:58:42"
}
]
Client Error - Returned if the request body is invalid.
- application/json
- Schema
- Example (auto)
Schema
Fine-grained error code providing more detail of the error.
400.1 Bad Request Content
Unique tracking id for the error.
e7eab60924f64aa284175b9fa3309599
messages object[]
causes object[]
{
"detailCode": "400.1 Bad Request Content",
"trackingId": "e7eab60924f64aa284175b9fa3309599",
"messages": [
{
"locale": "en-US",
"localeOrigin": "DEFAULT",
"text": "The request was syntactically correct but its content is semantically invalid."
}
],
"causes": [
{
"locale": "en-US",
"localeOrigin": "DEFAULT",
"text": "The request was syntactically correct but its content is semantically invalid."
}
]
}
Unauthorized - Returned if there is no authorization header, or if the JWT token is expired.
- application/json
- Schema
- Example (auto)
Schema
A message describing the error
JWT validation failed: JWT is expired
{
"error": "JWT validation failed: JWT is expired"
}
Forbidden - Returned if the user you are running as, doesn't have access to this end-point.
- application/json
- Schema
- Example (auto)
- 403
Schema
Fine-grained error code providing more detail of the error.
400.1 Bad Request Content
Unique tracking id for the error.
e7eab60924f64aa284175b9fa3309599
messages object[]
causes object[]
{
"detailCode": "400.1 Bad Request Content",
"trackingId": "e7eab60924f64aa284175b9fa3309599",
"messages": [
{
"locale": "en-US",
"localeOrigin": "DEFAULT",
"text": "The request was syntactically correct but its content is semantically invalid."
}
],
"causes": [
{
"locale": "en-US",
"localeOrigin": "DEFAULT",
"text": "The request was syntactically correct but its content is semantically invalid."
}
]
}
An example of a 403 response object
{
"detailCode": "403 Forbidden",
"trackingId": "b21b1f7ce4da4d639f2c62a57171b427",
"messages": [
{
"locale": "en-US",
"localeOrigin": "DEFAULT",
"text": "The server understood the request but refuses to authorize it."
}
]
}
Not Found - returned if the request URL refers to a resource or object that does not exist
- application/json
- Schema
- Example (auto)
- 404
Schema
Fine-grained error code providing more detail of the error.
400.1 Bad Request Content
Unique tracking id for the error.
e7eab60924f64aa284175b9fa3309599
messages object[]
causes object[]
{
"detailCode": "400.1 Bad Request Content",
"trackingId": "e7eab60924f64aa284175b9fa3309599",
"messages": [
{
"locale": "en-US",
"localeOrigin": "DEFAULT",
"text": "The request was syntactically correct but its content is semantically invalid."
}
],
"causes": [
{
"locale": "en-US",
"localeOrigin": "DEFAULT",
"text": "The request was syntactically correct but its content is semantically invalid."
}
]
}
An example of a 404 response object
{
"detailCode": "404 Not found",
"trackingId": "b21b1f7ce4da4d639f2c62a57171b427",
"messages": [
{
"locale": "en-US",
"localeOrigin": "DEFAULT",
"text": "The server did not find a current representation for the target resource."
}
]
}
Too Many Requests - Returned in response to too many requests in a given period of time - rate limited. The Retry-After header in the response includes how long to wait before trying again.
- application/json
- Schema
- Example (auto)
Schema
A message describing the error
Rate Limit Exceeded
{
"message": " Rate Limit Exceeded "
}
Internal Server Error - Returned if there is an unexpected error.
- application/json
- Schema
- Example (auto)
- 500
Schema
Fine-grained error code providing more detail of the error.
400.1 Bad Request Content
Unique tracking id for the error.
e7eab60924f64aa284175b9fa3309599
messages object[]
causes object[]
{
"detailCode": "400.1 Bad Request Content",
"trackingId": "e7eab60924f64aa284175b9fa3309599",
"messages": [
{
"locale": "en-US",
"localeOrigin": "DEFAULT",
"text": "The request was syntactically correct but its content is semantically invalid."
}
],
"causes": [
{
"locale": "en-US",
"localeOrigin": "DEFAULT",
"text": "The request was syntactically correct but its content is semantically invalid."
}
]
}
An example of a 500 response object
{
"detailCode": "500.0 Internal Fault",
"trackingId": "b21b1f7ce4da4d639f2c62a57171b427",
"messages": [
{
"locale": "en-US",
"localeOrigin": "DEFAULT",
"text": "An internal fault occurred."
}
]
}
Authorization: oauth2
type: Personal Access Tokenscopes: idn:identity:read
- go
- powershellSailPoint SDK
- pythonSailPoint SDK
- csharp
- curl
- dart
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- r
- ruby
- rust
- shell
- swift
- NATIVE
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sailpoint.api.identitynow.com/beta/identities/:identityId/role-assignments"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Bearer <TOKEN>")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}