Skip to content
Dashboard
Theme
Theme

Preview the role a sign-in would get

POST /v1/role_rules/preview: Preview the role a sign-in would get.

View Markdown

POST /v1/role_rules/preview

Evaluates the environment’s saved role rules, plus an optional unsaved draft rule, against a sample identity exactly as a sign-in does (same compiler, precedence and condition evaluator). The exact verified domain comes from the organization’s verified domains, as at sign-in; scim_groups stand in for the directory groups the SCIM index would bind. denied means a deny rule matched and the sign-in would be refused. Nothing is stored or audited, and the plan limits of saving rules do not apply to a draft.

Scope
policies:read
Auth
Secret key (sk_…)
Since
1.0
  • OhAuthCat-Version string

    Minor version; defaults to the environment’s pin.

  • organization string Required

  • connection string Required

  • email string

    max length 320

  • email_verified boolean

  • idp_groups array of string

    max items 100

  • idp_groups_verified boolean

  • scim_groups array of string

    max items 100

  • draft RoleRuleCreate

Errors share one shape; see the error code catalogue.

curl -X POST \
"https://api.ohauthcat.com/v1/role_rules/preview" \
-H "Authorization: Bearer $OHAUTHCAT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"organization": "org_01J9Z3K5V7W8X9Y0Z1A2B3C4D5",
"connection": "conn_01J9Z3K5V7W8X9Y0Z1A2B3C4D5"
}'
Response 200
{
"object": "role_rule_preview",
"role": "admin",
"denied": true
}