Replace the app-level access-control rule configuration for the specified application.
Body
Required
-
An array of user IDs that can access the application.
-
An array of user role IDs whose assigned users can access the application.
-
An array of organization IDs whose members can access the application.
-
An array of organization-role rule groups. Each group contains an organization ID and the organization role IDs that can access the application in that organization.
Responses
-
The app-level access-control rule configuration was replaced successfully.
-
Bad Request
-
Unauthorized
-
Forbidden
-
The application or referenced entities were not found, or app-level access control is unavailable.
-
The access-control rule payload contains invalid role types or empty organization-role groups.
PUT
/api/applications/{applicationId}/access-control
curl \
--request PUT 'https://[tenant_id].logto.app/api/applications/{applicationId}/access-control' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"userIds":["string"],"userRoleIds":["string"],"organizationIds":["string"],"organizationRoleRules":[{"organizationId":"string","organizationRoleIds":["string"]}]}'
Request examples
{
"userIds": [
"string"
],
"userRoleIds": [
"string"
],
"organizationIds": [
"string"
],
"organizationRoleRules": [
{
"organizationId": "string",
"organizationRoleIds": [
"string"
]
}
]
}
Response examples (200)
{
"userIds": [
"string"
],
"userRoleIds": [
"string"
],
"organizationIds": [
"string"
],
"organizationRoleRules": [
{
"organizationId": "string",
"organizationRoleIds": [
"string"
]
}
]
}