PersonalAccessTokensService
Use this API to implement personal access token (PAT) functionality. With this functionality in place, users can use PATs as an alternative to passwords for authentication in Identity Security Cloud.
PATs embed user information into the client ID and secret. This replaces the API clients' need to store and provide a username and password to establish a connection, improving Identity Security Cloud organizations' integration security.
In Identity Security Cloud, users can do the following to create and manage their PATs: Select the dropdown menu under their names, select Preferences, and then select Personal Access Tokens. They must then provide a description about the token's purpose. They can then select 'Create Token' at the bottom of the page to generate and view the Secret and Client ID.
Refer to Managing Personal Access Tokens for more information about PATs.
Every method returns an Observable. All request paths are relative to the baseUrl you pass to provideSailPoint().
| Method | HTTP request | Description |
|---|---|---|
| create-personal-access-token-v1 | POST /personal-access-tokens/v1 | Create personal access token |
| delete-personal-access-token-v1 | DELETE /personal-access-tokens/v1/{id} | Delete personal access token |
| list-personal-access-tokens-v1 | GET /personal-access-tokens/v1 | List personal access tokens |
| patch-personal-access-token-v1 | PATCH /personal-access-tokens/v1/{id} | Patch personal access token |
| update-bulk-personal-access-tokens-v1 | PATCH /personal-access-tokens/v1/bulk-update | Bulk update personal access tokens |
create-personal-access-token-v1
Create personal access token
This creates a personal access token.
expirationDate and userAwareTokenNeverExpires Relationship:
Important: When expirationDate is null or empty (not included in the request body), the token will never expire.
Required Validation: If expirationDate is null or empty, userAwareTokenNeverExpires must be set to true. This is a required validation rule.
The valid values for expirationDate depend on the value provided for userAwareTokenNeverExpires:
- When
userAwareTokenNeverExpiresistrue(or required to betrue):expirationDatecan benullor omitted from the request body. WhenexpirationDateisnullor empty, the token will never expire. This creates a PAT that never expires and serves as an explicit acknowledgment that the user is aware of the security implications of creating a non-expiring token. * WhenuserAwareTokenNeverExpiresisfalseor omitted:expirationDatemust be provided and must be a valid date-time string representing a future date (there is no upper limit).expirationDatecannot benullin this case. In this scenario,userAwareTokenNeverExpirescan be omitted. Validation Rules: * IfexpirationDateisnullor not included in the request body:userAwareTokenNeverExpiresmust be set totrue(required). The token will never expire. * IfexpirationDateis provided and is notnull:userAwareTokenNeverExpirescan be omitted. Security Considerations: TheuserAwareTokenNeverExpiresfield is designed to ensure that users explicitly acknowledge the security implications of creating tokens that never expire. Setting this field totrueindicates that the user understands the increased security risks and has made an informed decision to proceed. Note: TheuserAwareTokenNeverExpiresfield indicates that the user acknowledges they are creating a token that will never expire. It does not affect token behavior beyond indicating this acknowledgment.
Parameters
The service takes one object that holds every parameter. Its type is CreatePersonalAccessTokenV1RequestParams.
| Name | Type | Description | Notes |
|---|---|---|---|
| createPersonalAccessTokenRequest | CreatePersonalAccessTokenRequest | Configuration for creating a personal access token, including name, scope, expiration settings, and user acknowledgment of never-expiring tokens. Important: See the endpoint description for validation rules regarding the relationship between `expirationDate` and `userAwareTokenNeverExpires`. |
Return type
Observable<CreatePersonalAccessTokenResponse>
HTTP request headers
- Content-Type: application/json
- Accept: application/json
Example
import { Component, inject } from '@angular/core';
import { PersonalAccessTokensService } from '@sailpoint/angular-sdk/personal_access_tokens';
import { CreatePersonalAccessTokenRequest } from '@sailpoint/angular-sdk/personal_access_tokens';
@Component({ selector: 'app-example', template: '' })
export class ExampleComponent {
private readonly api = inject(PersonalAccessTokensService);
createPersonalAccessTokenV1(): void {
const createPersonalAccessTokenRequest: CreatePersonalAccessTokenRequest = ; // Configuration for creating a personal access token, including name, scope, expiration settings, and user acknowledgment of never-expiring tokens. **Important:** See the endpoint description for validation rules regarding the relationship between `expirationDate` and `userAwareTokenNeverExpires`.
this.api.createPersonalAccessTokenV1({ createPersonalAccessTokenRequest: createPersonalAccessTokenRequest }).subscribe({
next: (result) => console.log(result),
error: (error) => console.error(error),
});
}
}
delete-personal-access-token-v1
Delete personal access token This deletes a personal access token.
Parameters
The service takes one object that holds every parameter. Its type is DeletePersonalAccessTokenV1RequestParams.
| Name | Type | Description | Notes |
|---|---|---|---|
| id | string | The personal access token id | [default to undefined] |
Return type
Observable<void> (empty response body)
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
Example
import { Component, inject } from '@angular/core';
import { PersonalAccessTokensService } from '@sailpoint/angular-sdk/personal_access_tokens';
@Component({ selector: 'app-example', template: '' })
export class ExampleComponent {
private readonly api = inject(PersonalAccessTokensService);
deletePersonalAccessTokenV1(): void {
const id: string = ; // The personal access token id
this.api.deletePersonalAccessTokenV1({ id: id }).subscribe({
next: (result) => console.log(result),
error: (error) => console.error(error),
});
}
}
list-personal-access-tokens-v1
List personal access tokens
This gets a collection of personal access tokens associated with the optional owner-id. query parameter. If the owner-id query parameter is omitted, all personal access tokens for a tenant will be retrieved, but the caller must have the 'idn:all-personal-access-tokens:read' right.
Parameters
The service takes one object that holds every parameter. Its type is ListPersonalAccessTokensV1RequestParams.
| Name | Type | Description | Notes |
|---|---|---|---|
| ownerId | string | The identity ID of the owner whose personal access tokens should be listed. If "me", the caller should have the following right: 'idn:my-personal-access-tokens:read' If an actual owner ID or if the `owner-id` parameter is omitted in the request, the caller should have the following right: 'idn:all-personal-access-tokens:read'. If the caller has the following right, then managed personal access tokens associated with `owner-id` will be retrieved: 'idn:managed-personal-access-tokens:read' | [optional] [default to undefined] |
| filters | string | Filter results using the standard syntax described in V3 API Standard Collection Parameters Filtering is supported for the following fields and operators: lastUsed: le, isnull | [optional] [default to undefined] |
Return type
Observable<Array<GetPersonalAccessTokenResponse>>
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
Example
import { Component, inject } from '@angular/core';
import { PersonalAccessTokensService } from '@sailpoint/angular-sdk/personal_access_tokens';
@Component({ selector: 'app-example', template: '' })
export class ExampleComponent {
private readonly api = inject(PersonalAccessTokensService);
listPersonalAccessTokensV1(): void {
const ownerId: string = ; // The identity ID of the owner whose personal access tokens should be listed. If \"me\", the caller should have the following right: \'idn:my-personal-access-tokens:read\' If an actual owner ID or if the `owner-id` parameter is omitted in the request, the caller should have the following right: \'idn:all-personal-access-tokens:read\'. If the caller has the following right, then managed personal access tokens associated with `owner-id` will be retrieved: \'idn:managed-personal-access-tokens:read\' (optional)
const filters: string = ; // Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **lastUsed**: *le, isnull* (optional)
this.api.listPersonalAccessTokensV1({ }).subscribe({
next: (result) => console.log(result),
error: (error) => console.error(error),
});
}
}
patch-personal-access-token-v1
Patch personal access token
This performs a targeted update to the field(s) of a Personal Access Token.
Changing scopes for a Personal Access Token does not impact existing bearer tokens. You will need to create a new bearer token to have the new scopes. Please note that it can take up to 20 minutes for scope changes to be seen on new bearer tokens.
expirationDate and userAwareTokenNeverExpires Relationship:
Important: When expirationDate is null or empty (replaced to null or omitted from the patch request), the token will never expire.
Required Validation: If expirationDate is being replaced to null or is empty, userAwareTokenNeverExpires must be set to true in the patch request. This is a required validation rule.
When patching expirationDate and userAwareTokenNeverExpires, the valid values for expirationDate depend on the value provided for userAwareTokenNeverExpires:
- When
userAwareTokenNeverExpiresis being set totrue(or required to betrue):expirationDatecan be replaced tonullor omitted from the patch request. WhenexpirationDateisnullor empty, the token will never expire. This sets the PAT to never expire and serves as an explicit acknowledgment that the user is aware of the security implications of creating a non-expiring token. * WhenuserAwareTokenNeverExpiresisfalseor omitted:expirationDatemust be provided and must be a valid date-time string representing a future date (there is no upper limit).expirationDatecannot benullin this case. In this scenario,userAwareTokenNeverExpirescan be omitted. Validation Rules: * IfexpirationDateis being replaced tonull:userAwareTokenNeverExpiresmust also be present in the patch request with a value oftrue(required). The token will never expire. * IfexpirationDateis not being replaced tonull(i.e., set to a future date):userAwareTokenNeverExpirescan be omitted. Security Considerations: TheuserAwareTokenNeverExpiresfield is designed to ensure that users explicitly acknowledge the security implications of creating tokens that never expire. Setting this field totrueindicates that the user understands the increased security risks and has made an informed decision to proceed. Note: TheuserAwareTokenNeverExpiresfield indicates that the user acknowledges they are creating a token that will never expire. It does not affect token behavior beyond indicating this acknowledgment.
Parameters
The service takes one object that holds every parameter. Its type is PatchPersonalAccessTokenV1RequestParams.
| Name | Type | Description | Notes |
|---|---|---|---|
| id | string | The Personal Access Token id | [default to undefined] |
| jsonPatchOperation | Array<JsonPatchOperation> | A list of OAuth client update operations according to the JSON Patch standard. The following fields are patchable: * name * scope * expirationDate * userAwareTokenNeverExpires Important: See the endpoint description for validation rules regarding the relationship between `expirationDate` and `userAwareTokenNeverExpires`. |
Return type
Observable<GetPersonalAccessTokenResponse>
HTTP request headers
- Content-Type: application/json-patch+json
- Accept: application/json
Example
import { Component, inject } from '@angular/core';
import { PersonalAccessTokensService } from '@sailpoint/angular-sdk/personal_access_tokens';
import { JsonPatchOperation } from '@sailpoint/angular-sdk/personal_access_tokens';
@Component({ selector: 'app-example', template: '' })
export class ExampleComponent {
private readonly api = inject(PersonalAccessTokensService);
patchPersonalAccessTokenV1(): void {
const id: string = ; // The Personal Access Token id
const jsonPatchOperation: Array<JsonPatchOperation> = ; // A list of OAuth client update operations according to the [JSON Patch](https://tools.ietf.org/html/rfc6902) standard. The following fields are patchable: * name * scope * expirationDate * userAwareTokenNeverExpires **Important:** See the endpoint description for validation rules regarding the relationship between `expirationDate` and `userAwareTokenNeverExpires`.
this.api.patchPersonalAccessTokenV1({ id: id, jsonPatchOperation: jsonPatchOperation }).subscribe({
next: (result) => console.log(result),
error: (error) => console.error(error),
});
}
}
update-bulk-personal-access-tokens-v1
Bulk update personal access tokens
This applies a single JSON Patch document to multiple personal access tokens (PATs) in the current tenant in one request.
The same patch is applied to every token referenced in ids. Up to 25 tokens can be updated per request.
This is an administrative operation intended for org admins managing PATs across their tenant. The caller must have the idn:all-personal-access-tokens:update right. API OAuth client credentials are not permitted to call this endpoint.
Note: This operation is also accessible via POST to the same path; both methods behave identically. Unlike the single-token patch endpoint, the request body uses Content-Type: application/json (not application/json-patch+json).
Allowed patch paths
Only expiration-related paths may be modified in bulk:
/expirationDate- Set or clear the token's expiration date. Any other path (for example/nameor/scope) results in a400response./userAwareTokenNeverExpires- Explicit acknowledgment that the token will never expire. expirationDate and userAwareTokenNeverExpires Relationship: When clearingexpirationDate(either by removing it or replacing it withnull),userAwareTokenNeverExpiresmust also be set totruein the same patch. This serves as an explicit acknowledgment that the caller is aware of the security implications of creating a token that will never expire. WhenexpirationDateis set to a valid future date-time,userAwareTokenNeverExpirescan be omitted. Note:userAwareTokenNeverExpiresis stored internally and is not returned in the response.
Parameters
The service takes one object that holds every parameter. Its type is UpdateBulkPersonalAccessTokensV1RequestParams.
| Name | Type | Description | Notes |
|---|---|---|---|
| bulkUpdatePersonalAccessTokensRequest | BulkUpdatePersonalAccessTokensRequest | The IDs of the personal access tokens to update, along with a single JSON Patch document to apply to each of them. |
Return type
Observable<Array<GetPersonalAccessTokenResponse>>
HTTP request headers
- Content-Type: application/json
- Accept: application/json
Example
import { Component, inject } from '@angular/core';
import { PersonalAccessTokensService } from '@sailpoint/angular-sdk/personal_access_tokens';
import { BulkUpdatePersonalAccessTokensRequest } from '@sailpoint/angular-sdk/personal_access_tokens';
@Component({ selector: 'app-example', template: '' })
export class ExampleComponent {
private readonly api = inject(PersonalAccessTokensService);
updateBulkPersonalAccessTokensV1(): void {
const bulkUpdatePersonalAccessTokensRequest: BulkUpdatePersonalAccessTokensRequest = ; // The IDs of the personal access tokens to update, along with a single JSON Patch document to apply to each of them.
this.api.updateBulkPersonalAccessTokensV1({ bulkUpdatePersonalAccessTokensRequest: bulkUpdatePersonalAccessTokensRequest }).subscribe({
next: (result) => console.log(result),
error: (error) => console.error(error),
});
}
}