---
title: "POST /assoc-role-am"
method: POST
path: "/assoc-role-am"
tags: ["Access Roles"]
---

# POST /assoc-role-am

`POST /assoc-role-am`

## Request

- Base URL: `https://api.akeyless.io`
- URL: `https://api.akeyless.io/assoc-role-am`
- Auth: none declared

## Request body

- AssocRoleAuthMethod: assocRoleAuthMethod is a command that creates an association between role and auth method.
  - `am-name` string, required: The auth method to associate
  - `case-sensitive` string: Treat sub claims as case-sensitive [true/false]
  - `json` boolean: Set output format to JSON
  - `role-name` string, required: The role to associate
  - `sub-claims` object: key/val of sub claims, e.g group=admins,developers
  - `token` string: Authentication token (see `/auth` and `/configure`)
  - `uid-token` string: The universal identity token, Required only for universal_identity authentication

## Response `200`

assocRoleAuthMethodResponse wraps response body.

- CreateRoleAuthMethodAssocOutput: CreateRoleAuthMethodAssocOutput defines output of CreateRoleAuthMethodAssoc operation.
  - `assoc_id` string

## Other responses

- `default`: errorResponse wraps any error to return it as a JSON object with one "error" field.

---

[API](https://skmtc.dev/akeyless/apis/identity-access.md) - [All operations](https://skmtc.dev/akeyless/apis/identity-access/llms.txt) - [OpenAPI document](https://skmtc.dev/akeyless/apis/identity-access/revisions/6fbc3858ec88?raw)
