admin.auth.policy.*: assign users to, or remove them from, an authentication policy (currently email_password, which lets them sign in with email and password alongside SSO). entity_type is USER. Scope: admin.users:read / admin.users:write.

Example

::auth ::slack::admin::auth

::auth/policy-assign-entities(::auth/PolicyAssignEntitiesRequest({
  policy_name: "email_password",
  entity_type: "USER",
  entity_ids: ["U0123ABCDEF"]
}))

Functions

policy-assign-entities

fn (request: PolicyAssignEntitiesRequest): Map
fn (request: PolicyAssignEntitiesRequest, opts: Map): Map

admin.auth.policy.assignEntities - Assign users to a policy.

Scope: admin.users:write. Returns Slack's response body; ok: false comes back as an Err(SlackError).

policy-get-entities

fn (request: PolicyGetEntitiesRequest): Map
fn (request: PolicyGetEntitiesRequest, opts: Map): Map

admin.auth.policy.getEntities - List the entities assigned to a policy (entities, entity_total_count).

Scope: admin.users:read. Returns Slack's response body; ok: false comes back as an Err(SlackError). Cursor-paginated: pass cursor from response_metadata.next_cursor, or use policy-get-entities-all.

policy-get-entities-all

fn (request: PolicyGetEntitiesRequest): Vec
fn (request: PolicyGetEntitiesRequest, max-items: Int): Vec
fn (request: PolicyGetEntitiesRequest, max-items: Int, opts: Map): Vec

Every entities entry from admin.auth.policy.getEntities, following next_cursor until the last page or max-items (default 1000). request sets the filters; its cursor is the starting point.

policy-remove-entities

fn (request: PolicyRemoveEntitiesRequest): Map
fn (request: PolicyRemoveEntitiesRequest, opts: Map): Map

admin.auth.policy.removeEntities - Remove users from a policy.

Scope: admin.users:write. Returns Slack's response body; ok: false comes back as an Err(SlackError).

Types

PolicyAssignEntitiesRequest

PolicyAssignEntitiesRequest type {
    policy_name: Str,
    entity_type: Str,
    entity_ids: Vec<Str>
}

PolicyGetEntitiesRequest

PolicyGetEntitiesRequest type {
    policy_name: Str,
    entity_type: Str?,
    cursor: Str?,
    limit: Int?
}

PolicyRemoveEntitiesRequest

PolicyRemoveEntitiesRequest type {
    policy_name: Str,
    entity_type: Str,
    entity_ids: Vec<Str>
}