Check User Group Restriction
POST/groups-srv/verifications
This API call checks if a user meets specified user group restriction.
Purpose:
- Real-time verification of user access permissions based on group memberships and roles
- Authorization checks before granting access to protected resources
- Validation of user eligibility for specific operations or features
Authentication Requirements:
- This endpoint requires authentication via Bearer token
- For anonymous tokens, the
cidaas:users_readscope is required - Any authenticated caller may verify any valid
subin the request body (no self-only restriction on POST)
Request Structure:
sub: Required, the user ID to verifymatchCondition: Required, determines how multiple filters are combined ("and" or "or")filters: Required array, must contain at least one filterhints: Optional, controls which fields appear in the response (groupIds,rolesOfGroup,allowedGroups)
Filter Rules:
- Each filter must specify exactly one of
groupIdorgroupType(not both, not neither) roleFilteris optional and can be used with eithergroupIdorgroupType
Validation Rules:
sub: Required, must be a valid user ID (UUID format), user must existmatchCondition: Required, must be either "and" or "or"filters: Required, must be a non-empty array- If
groupIdis specified, the group must exist - If
groupTypeis specified, the group type must exist - If
roleFilteris provided:matchCondition: Required, must be "and" or "or"roles: Required array, must contain at least one role name- All roles must exist in the system
Business Rules:
- When
matchConditionis "or", the user needs to meet at least one filter condition. - When
matchConditionis "and", the user must meet all filter conditions. - Role filters are evaluated within the context of the group(s) specified in the filter.
- If a user is a member of multiple groups that match, all matching groups are returned in
allowedGroups. - Response fields beyond
verifieddepend on thehintsprovided in the request.
Request
Responses
- 200
- 400
- 401
OK
Bad Request — invalid request body or missing/invalid sub.
| Code | error | When |
|---|---|---|
10101 | error while parsing body request data! | Request body is missing, malformed, or not valid JSON |
10101 | invalid payload | sub is missing or anonymous |
Unauthorized