/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. Only the API server that the organization owns may ask about it: 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. 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(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 |
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>'