Grant a list of organization access of a user for a application.
Grant a list of organization access of a user for a application by application id and user id.
The user must be a member of all the organizations.
Only third-party application needs to be granted access to organizations, all the other applications can request for all the organizations' access by default.
Path parameters
-
The unique identifier of the application.
-
The unique identifier of the user.
Body Required
-
A list of organization ids to be granted.
Minimum length of each is
1
.
POST
/api/applications/{id}/users/{userId}/consent-organizations
curl \
-X POST https://[tenant_id].logto.app/api/applications/{id}/users/{userId}/consent-organizations \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"organizationIds":["string"]}'
Request examples
{
"organizationIds": [
"string"
]
}