/api/resource-server/organizations/{organization_id}/members/{uid}/rolePublicLook up a user's organization role
Tells a resource server which role (owner, member, ...) a user holds in an organization, or null when they are not a member or do not exist. The service account of a client application (the subject of its client_credentials tokens) holds the role its app's managers configured with PUT /api/apps/{app_id}/service-account/organization-membership in the organization that owns the app, and no role anywhere else. The calling API server names itself in the X-Api-Server-Id header and proves it with a single-use JWKS access assertion signed with its JWKS access private key. It may always ask about the organization that owns it. It may ask about any other organization only when a platform administrator set its organization membership visibility to all_organizations (PUT /api/apis/{api_server_id}/organization-membership-visibility), and then only about a user who presents an active access token for the API server, forwarded in X-Subject-Token. Resource servers built on @schemavaults/auth-server-sdk call this through isUserInOrganization().
get_api_resource_server_organizations_organization_id_members_uid_roleResource serversAuthentication & permissionsPublic
Anyone — no credentials required
- Accepted credentials
- None required
- Notes
- Requires
Authorization: Bearer <JWKS access assertion>(theschemavaults-jwks-access-assertionscheme) signed by the API server named inX-Api-Server-Id; the handler verifies it after the path and header validation, so a malformed request is refused with 400 before the credential is examined, a missing or invalid assertion with 401. The API server must belong toorganization_id, or hold theall_organizationsmembership visibility and forward the user's access token for it inX-Subject-Token(403 otherwise).
Path parameters
| Name | Type | Description |
|---|---|---|
| organization_id* | string | Organization the API server belongs to |
| uid* | string (uuid) | User id to look up |
Request headers
| Name | Type | Description |
|---|---|---|
| x-api-server-id* | string | Id of the calling API server; the assertion must be signed with its JWKS access key |
| x-subject-token | string | The user's access token for the calling API server, exactly as it was presented to the resource server: a JWE in compact serialization of at most 4096 characters. Required when |
Responses
| Property | Type | Description |
|---|---|---|
| success* | true | |
| data* | object | |
| organization_id* | string | minLength: 4maxLength: 32pattern: ^[a-z][a-z0-9_-]+$ |
| uid* | string (uuid) | |
| role* | string | null | null | The user's role in the organization, or null when not a member (or no such user) |
Example request
curl -X GET 'https://auth.schemavaults.com/api/resource-server/organizations/<organization_id>/members/<uid>/role' \
-H 'x-api-server-id: <x-api-server-id>'