Auth settings
The Auth Settings API allows you to configure and manage authentication settings for your tenant, including identity provider configurations and security policies.
Endpoints
Returns the authentication settings for the tenant, including the session inactivity timeout and maximum session lifespan. If no custom values have been saved, the response reflects tenant-wide defaults with isDefault set to true. The user must be assigned the TenantAdmin role.
Facts
| Rate limit | Tier 1 (1000 requests per minute) |
Responses
200
Authentication settings retrieved successfully.
- application/json object
The authentication settings for a tenant, controlling user session duration and inactivity behavior.
application/json properties
- id string
The unique identifier for the authentication settings.
- tenantId stringRequired
The tenant unique identifier associated with the authentication settings.
- isDefault boolean
trueif the authentication settings are using tenant-wide defaults. No custom values have been saved for this tenant. - maxUserSessionLifespanMinutes integerRequired
Maximum total lifespan for a user session, in minutes. Sessions are invalidated after this duration regardless of activity.
- dcrAllowedAuthenticationMethods array of strings
The allowed authentication methods for dynamic client registration. Only present when dynamic client registration is enabled.
Values may be any of: "none""client_secret"
- dynamicClientRegistrationEnabled boolean
Indicates whether dynamic client registration is enabled for this tenant.
- userSessionInactivityTimeoutMinutes integerRequired
Maximum inactivity period for a user session, in minutes. Sessions that have been idle for longer than this value are invalidated.
-
401
Not authorized.
- application/json object
The error response object describing the error from the handling of an HTTP request.
application/json properties
- errors array of objects
An array of errors related to the operation.
errors properties
- code stringRequired
The error code.
- meta object
Additional properties relating to the error.
- title stringRequired
Summary of the problem.
- detail string
A human-readable explanation specific to this occurrence of the problem.
- source object
References to the source of the error.
source properties
- pointer string
A JSON Pointer to the property that caused the error.
- parameter string
The URI query parameter that caused the error.
-
-
- traceId string
A unique identifier for tracing the error.
-
403
The authenticated user does not have the TenantAdmin role required to read authentication settings.
- application/json object
The error response object describing the error from the handling of an HTTP request.
application/json properties
- errors array of objects
An array of errors related to the operation.
errors properties
- code stringRequired
The error code.
- meta object
Additional properties relating to the error.
- title stringRequired
Summary of the problem.
- detail string
A human-readable explanation specific to this occurrence of the problem.
- source object
References to the source of the error.
source properties
- pointer string
A JSON Pointer to the property that caused the error.
- parameter string
The URI query parameter that caused the error.
-
-
- traceId string
A unique identifier for tracing the error.
-
404
Authentication settings not found.
- application/json object
The error response object describing the error from the handling of an HTTP request.
application/json properties
- errors array of objects
An array of errors related to the operation.
errors properties
- code stringRequired
The error code.
- meta object
Additional properties relating to the error.
- title stringRequired
Summary of the problem.
- detail string
A human-readable explanation specific to this occurrence of the problem.
- source object
References to the source of the error.
source properties
- pointer string
A JSON Pointer to the property that caused the error.
- parameter string
The URI query parameter that caused the error.
-
-
- traceId string
A unique identifier for tracing the error.
-
429
Request has been rate limited.
- application/json object
The error response object describing the error from the handling of an HTTP request.
application/json properties
- errors array of objects
An array of errors related to the operation.
errors properties
- code stringRequired
The error code.
- meta object
Additional properties relating to the error.
- title stringRequired
Summary of the problem.
- detail string
A human-readable explanation specific to this occurrence of the problem.
- source object
References to the source of the error.
source properties
- pointer string
A JSON Pointer to the property that caused the error.
- parameter string
The URI query parameter that caused the error.
-
-
- traceId string
A unique identifier for tracing the error.
-
500
Internal server error.
- application/json object
The error response object describing the error from the handling of an HTTP request.
application/json properties
- errors array of objects
An array of errors related to the operation.
errors properties
- code stringRequired
The error code.
- meta object
Additional properties relating to the error.
- title stringRequired
Summary of the problem.
- detail string
A human-readable explanation specific to this occurrence of the problem.
- source object
References to the source of the error.
source properties
- pointer string
A JSON Pointer to the property that caused the error.
- parameter string
The URI query parameter that caused the error.
-
-
- traceId string
A unique identifier for tracing the error.
-
import { createQlikApi } from '@qlik/api'
const qlik = createQlikApi({ hostConfig: { host: 'https://{tenant}.{region}.qlikcloud.com', apiKey: '<access-token>', },})
await qlik.core.authSettings.getAuthSettings()qlik core auth-settings lscurl "https://{tenant}.{region}.qlikcloud.com/api/core/auth-settings" \-H "Authorization: Bearer <access_token>"Example Response
{ "id": "507f191e810c19729de860ea", "tenantId": "644fd58b846d649c82eba436", "isDefault": false, "maxUserSessionLifespanMinutes": 1440, "dcrAllowedAuthenticationMethods": [ "client_secret" ], "dynamicClientRegistrationEnabled": false, "userSessionInactivityTimeoutMinutes": 60}Updates one or more authentication settings for the tenant using JSON Patch (RFC 6902). Supports replace operations on /userSessionInactivityTimeoutMinutes, /maxUserSessionLifespanMinutes, and /dynamicClientRegistrationEnabled. The value for maxUserSessionLifespanMinutes must be a whole number of hours (divisible by 60). The user must be assigned the TenantAdmin role.
Facts
| Rate limit | Tier 2 (100 requests per minute) |
Request Body
RequiredAn array of JSON Patch operations to apply to the authentication settings.
- application/json array of objects
An array of JSON Patch documents for authentication settings.
application/json properties
- op stringRequired
The operation to be performed.
Can be one of: "replace"
- path stringRequired
A JSON Pointer to the authentication settings field. Use
/dynamicClientRegistrationEnabledonly with a booleanvalue. Field/dcrAllowedAuthenticationMethodsis only available when dynamic client registration is enabled.Can be one of: "/userSessionInactivityTimeoutMinutes""/maxUserSessionLifespanMinutes""/dynamicClientRegistrationEnabled""/dcrAllowedAuthenticationMethods"
- value integer|boolean|string|arrayRequired
Value to set for the targeted authentication settings field. Timeout fields accept only integer values,
/dynamicClientRegistrationEnabledaccepts only boolean values, and/dcrAllowedAuthenticationMethodsaccepts an array of strings.One of:- integer
- boolean
- string
- array of strings
-
-
Responses
200
Authentication settings updated successfully.
- application/json object
The authentication settings for a tenant, controlling user session duration and inactivity behavior.
application/json properties
- id string
The unique identifier for the authentication settings.
- tenantId stringRequired
The tenant unique identifier associated with the authentication settings.
- isDefault boolean
trueif the authentication settings are using tenant-wide defaults. No custom values have been saved for this tenant. - maxUserSessionLifespanMinutes integerRequired
Maximum total lifespan for a user session, in minutes. Sessions are invalidated after this duration regardless of activity.
- dcrAllowedAuthenticationMethods array of strings
The allowed authentication methods for dynamic client registration. Only present when dynamic client registration is enabled.
Values may be any of: "none""client_secret"
- dynamicClientRegistrationEnabled boolean
Indicates whether dynamic client registration is enabled for this tenant.
- userSessionInactivityTimeoutMinutes integerRequired
Maximum inactivity period for a user session, in minutes. Sessions that have been idle for longer than this value are invalidated.
-
400
Invalid request body.
- application/json object
The error response object describing the error from the handling of an HTTP request.
application/json properties
- errors array of objects
An array of errors related to the operation.
errors properties
- code stringRequired
The error code.
- meta object
Additional properties relating to the error.
- title stringRequired
Summary of the problem.
- detail string
A human-readable explanation specific to this occurrence of the problem.
- source object
References to the source of the error.
source properties
- pointer string
A JSON Pointer to the property that caused the error.
- parameter string
The URI query parameter that caused the error.
-
-
- traceId string
A unique identifier for tracing the error.
-
401
Not authorized.
- application/json object
The error response object describing the error from the handling of an HTTP request.
application/json properties
- errors array of objects
An array of errors related to the operation.
errors properties
- code stringRequired
The error code.
- meta object
Additional properties relating to the error.
- title stringRequired
Summary of the problem.
- detail string
A human-readable explanation specific to this occurrence of the problem.
- source object
References to the source of the error.
source properties
- pointer string
A JSON Pointer to the property that caused the error.
- parameter string
The URI query parameter that caused the error.
-
-
- traceId string
A unique identifier for tracing the error.
-
403
The authenticated user does not have the TenantAdmin role required to update authentication settings.
- application/json object
The error response object describing the error from the handling of an HTTP request.
application/json properties
- errors array of objects
An array of errors related to the operation.
errors properties
- code stringRequired
The error code.
- meta object
Additional properties relating to the error.
- title stringRequired
Summary of the problem.
- detail string
A human-readable explanation specific to this occurrence of the problem.
- source object
References to the source of the error.
source properties
- pointer string
A JSON Pointer to the property that caused the error.
- parameter string
The URI query parameter that caused the error.
-
-
- traceId string
A unique identifier for tracing the error.
-
404
Authentication settings not found.
- application/json object
The error response object describing the error from the handling of an HTTP request.
application/json properties
- errors array of objects
An array of errors related to the operation.
errors properties
- code stringRequired
The error code.
- meta object
Additional properties relating to the error.
- title stringRequired
Summary of the problem.
- detail string
A human-readable explanation specific to this occurrence of the problem.
- source object
References to the source of the error.
source properties
- pointer string
A JSON Pointer to the property that caused the error.
- parameter string
The URI query parameter that caused the error.
-
-
- traceId string
A unique identifier for tracing the error.
-
429
Request has been rate limited.
- application/json object
The error response object describing the error from the handling of an HTTP request.
application/json properties
- errors array of objects
An array of errors related to the operation.
errors properties
- code stringRequired
The error code.
- meta object
Additional properties relating to the error.
- title stringRequired
Summary of the problem.
- detail string
A human-readable explanation specific to this occurrence of the problem.
- source object
References to the source of the error.
source properties
- pointer string
A JSON Pointer to the property that caused the error.
- parameter string
The URI query parameter that caused the error.
-
-
- traceId string
A unique identifier for tracing the error.
-
500
Internal server error.
- application/json object
The error response object describing the error from the handling of an HTTP request.
application/json properties
- errors array of objects
An array of errors related to the operation.
errors properties
- code stringRequired
The error code.
- meta object
Additional properties relating to the error.
- title stringRequired
Summary of the problem.
- detail string
A human-readable explanation specific to this occurrence of the problem.
- source object
References to the source of the error.
source properties
- pointer string
A JSON Pointer to the property that caused the error.
- parameter string
The URI query parameter that caused the error.
-
-
- traceId string
A unique identifier for tracing the error.
-
import { createQlikApi } from '@qlik/api'
const qlik = createQlikApi({ hostConfig: { host: 'https://{tenant}.{region}.qlikcloud.com', apiKey: '<access-token>', },})
await qlik.core.authSettings.patchAuthSettings([ { op: 'replace', path: '/userSessionInactivityTimeoutMinutes', value: 60, },
{ op: 'replace', path: '/maxUserSessionLifespanMinutes', value: 1440, },
{ op: 'replace', path: '/dynamicClientRegistrationEnabled', value: true, },
{ op: 'replace', path: '/dcrAllowedAuthenticationMethods', value: ['client_secret'], },])qlik core auth-settings patch \ --op 'replace' \ --path '/userSessionInactivityTimeoutMinutes' \ --value 60curl "https://{tenant}.{region}.qlikcloud.com/api/core/auth-settings" \-X PATCH \-H "Content-type: application/json" \-H "Authorization: Bearer <access_token>" \-d '[{"op":"replace","path":"/userSessionInactivityTimeoutMinutes","value":60},{"op":"replace","path":"/maxUserSessionLifespanMinutes","value":1440},{"op":"replace","path":"/dynamicClientRegistrationEnabled","value":true},{"op":"replace","path":"/dcrAllowedAuthenticationMethods","value":["client_secret"]}]'Example Response
{ "id": "507f191e810c19729de860ea", "tenantId": "644fd58b846d649c82eba436", "isDefault": false, "maxUserSessionLifespanMinutes": 1440, "dcrAllowedAuthenticationMethods": [ "client_secret" ], "dynamicClientRegistrationEnabled": false, "userSessionInactivityTimeoutMinutes": 60}