> For AI agents: [llms.txt](https://docs.trustedauth.com/llms.txt) provides a Markdown index of this documentation.

# Get a role

`GET /api/web/v1/roles/{id}`

Get a specified role. Caller requires the ROLES:VIEW permission.

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| id | path | Yes | string | The UUID of the role to be fetched. |

## Responses

### 200

Successful

#### application/json

Schema

```json
{
  "required": [
    "name",
    "roleType"
  ],
  "type": "object",
  "properties": {
    "allRoles": {
      "type": "boolean",
      "description": "A flag indicating if administrators with this role can manage all roles and all users."
    },
    "defaultRole": {
      "type": "boolean",
      "description": "A flag indicating if this role is one of the default roles."
    },
    "description": {
      "type": "string",
      "description": "The description of the role."
    },
    "groupIds": {
      "type": "array",
      "description": "The UUIDs of groups associated with this role when Group Management is DEFINED. This attribute is ignored if Group Management is ALL or OWN.",
      "items": {
        "type": "string",
        "description": "The UUIDs of groups associated with this role when Group Management is DEFINED. This attribute is ignored if Group Management is ALL or OWN."
      }
    },
    "groupManagement": {
      "type": "string",
      "description": "The type of the group management. Defaults to ALL if not provided.",
      "enum": [
        "ALL",
        "DEFINED",
        "OWN"
      ]
    },
    "id": {
      "type": "string",
      "description": "The UUID of the role."
    },
    "managedRoles": {
      "type": "array",
      "description": "If allRoles is false, this attribute lists the roles and administrators in these roles that can be administered by administrators with this role.  Administrators will also be able to manage end users.",
      "items": "circular(Role)"
    },
    "name": {
      "type": "string",
      "description": "The name of the role."
    },
    "permissions": {
      "type": "array",
      "description": "A list of the permissions assigned to this role.",
      "items": {
        "required": [
          "actionType",
          "entityType",
          "id",
          "roleType"
        ],
        "type": "object",
        "properties": {
          "actionType": {
            "type": "string",
            "description": "The action to which this permission applies.",
            "enum": [
              "VIEW",
              "ADD",
              "EDIT",
              "REMOVE",
              "ALL"
            ]
          },
          "entityType": {
            "type": "string",
            "description": "The entity to which this permission applies.",
            "enum": [
              "ALL",
              "SUBSCRIBERS",
              "USERS",
              "APPLICATIONS",
              "TOKENS",
              "ROLES",
              "SPROLES",
              "CONTEXTRULES",
              "AUTHORIZATIONGROUPS",
              "USERATTRIBUTES",
              "USERATTRIBUTEVALUES",
              "AGENTS",
              "GROUPS",
              "SETTINGS",
              "DIRECTORIES",
              "DIRECTORYSYNC",
              "DIRECTORYCONNECTIONS",
              "TEMPLATES",
              "USERSITEROLES",
              "REPORTS",
              "BULKUSERS",
              "BULKGROUPS",
              "USERPASSWORDS",
              "SERVICEPROVIDERS",
              "SERVICEPROVIDERACCOUNTS",
              "USERMACHINES",
              "CAS",
              "BULKHARDWARETOKENS",
              "BULKSMARTCARDS",
              "DIGITALIDCONFIGS",
              "DIGITALIDCONFIGVARIABLES",
              "DIGITALIDCONFIGCERTTEMPS",
              "DIGITALIDCONFIGSANS",
              "SCDEFNS",
              "SCDEFNPIVAPPLETCONFIGS",
              "SCDEFNVARIABLES",
              "SMARTCREDENTIALS",
              "SMARTCREDENTIALSSIGNATURE",
              "USERSPROLES",
              "EXPECTEDLOCATIONS",
              "USERLOCATIONS",
              "USERRBASETTINGS",
              "SPCLIENTCREDENTIALS",
              "SPMANAGEMENTPLATFORM",
              "ENTITLEMENTS",
              "QUESTIONS",
              "USERQUESTIONS",
              "USERQUESTIONANSWERS",
              "USERKBACHALLENGES",
              "WORDSYNONYMS",
              "GATEWAYS",
              "GATEWAYCSRS",
              "SPUSERMGMT",
              "BULKIDENTITYGUARD",
              "TEMPACCESSCODES",
              "TEMPACCESSCODECONTENTS",
              "GRIDS",
              "GRIDCONTENTS",
              "FIDOTOKENS",
              "EXPORTREPORTS",
              "CUSTOMIZATIONVARIABLES",
              "BLACKLISTEDPASSWORDS",
              "SPENTITLEMENTS",
              "CREATETENANT",
              "TENANTS",
              "ARCHIVES",
              "CERTIFICATES",
              "INTELLITRUSTDESKTOPS",
              "ACTIVESYNC",
              "PRINTERS",
              "ISSUANCE",
              "OTPS",
              "AD_CONNECTOR_DIRECTORIES",
              "AZURE_DIRECTORIES",
              "SCHEDULEDTASKS",
              "CREDENTIALDESIGNS",
              "ENROLLMENTS",
              "BULKENROLLMENTS",
              "EMAILTEMPLATES",
              "EMAILVARIABLES",
              "SENDEMAIL",
              "SENDSCIM",
              "SENDAZUREAD",
              "DIRECTORYPASSWORD",
              "TRANSACTIONITEMS",
              "TRANSACTIONRULES",
              "ENROLLMENTDESIGNS",
              "HIGH_AVAILABILITY_GROUPS",
              "PKIAASCREDENTIALS",
              "DIGITALIDCERTIFICATES",
              "PIVCONTENTSIGNER",
              "RESOURCESERVERAPIS",
              "RESOURCESERVERSCOPES",
              "USEROAUTHTOKENS",
              "GROUPPOLICIES",
              "OAUTHROLES",
              "IDENTITYPROVIDERS",
              "SMARTCARDS",
              "IPLISTS",
              "DOMAINCONTROLLERCERTS",
              "OTPPROVIDERS",
              "PREFERREDOTPPROVIDERS",
              "SPIDENTITYPROVIDERS",
              "PUSHCREDENTIALS",
              "DIRECTORYSEARCHATTRIBUTES",
              "DIRECTORYATTRIBUTES",
              "RISKENGINES",
              "SCIMPROVISIONINGS",
              "RATELIMITING",
              "CLAIMS",
              "CONTACTVERIFICATION",
              "HOSTNAMESETTINGS",
              "MAGICLINKS",
              "MAGICLINKCONTENTS",
              "AUTHENTICATIONFLOWS",
              "FACE",
              "TOKENACTIVATIONCONTENTS",
              "PASSTHROUGH",
              "POLICYOVERRIDE",
              "ORGANIZATIONS",
              "WEBHOOKS",
              "WEBHOOK_NOTIFICATION",
              "VCDEFNS",
              "VCS",
              "PLAYINTEGRITYCREDENTIALS",
              "VPDEFNS",
              "ACRS",
              "FLEET_MANAGEMENT_ALERT",
              "VERIFYUSER",
              "USER_PRINTER_PREFERENCE",
              "NAMEDPASSWORDS",
              "WEBSERVICES",
              "WORKLOADIDENTITY"
            ]
          },
          "id": {
            "type": "string",
            "description": "The UUID of this permission."
          },
          "roleType": {
            "type": "string",
            "description": "The role type to which this permission applies.",
            "enum": [
              "SITE_ADMINISTRATOR",
              "ACCOUNT_MANAGER"
            ]
          }
        },
        "description": "Details about a permission assign to a role.",
        "title": "Permission"
      }
    },
    "roleType": {
      "type": "string",
      "description": "The type of the role.",
      "enum": [
        "SITE_ADMINISTRATOR",
        "ACCOUNT_MANAGER"
      ]
    },
    "superAdministrator": {
      "type": "boolean",
      "description": "A flag indicating if this role is a super administrator."
    }
  },
  "description": "Information about a role.",
  "title": "Role"
}
```

### 400

Bad Request

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "errorCode": {
      "type": "string",
      "description": "Error Codes specific to cause of failure.",
      "example": "invalid_user_response"
    },
    "errorMessage": {
      "type": "string",
      "description": "Additional Error Message describing the error.",
      "example": "Application id cannot be null"
    },
    "parameters": {
      "type": "array",
      "description": "Optional additional error information.",
      "items": {
        "type": "object",
        "description": "Optional additional error information."
      }
    }
  },
  "description": "Object containing information about errors reported by services.",
  "title": "ErrorInfo"
}
```

### 401

Access denied

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "errorCode": {
      "type": "string",
      "description": "Error Codes specific to cause of failure.",
      "example": "invalid_user_response"
    },
    "errorMessage": {
      "type": "string",
      "description": "Additional Error Message describing the error.",
      "example": "Application id cannot be null"
    },
    "parameters": {
      "type": "array",
      "description": "Optional additional error information.",
      "items": {
        "type": "object",
        "description": "Optional additional error information."
      }
    }
  },
  "description": "Object containing information about errors reported by services.",
  "title": "ErrorInfo"
}
```

### 403

Forbidden

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "errorCode": {
      "type": "string",
      "description": "Error Codes specific to cause of failure.",
      "example": "invalid_user_response"
    },
    "errorMessage": {
      "type": "string",
      "description": "Additional Error Message describing the error.",
      "example": "Application id cannot be null"
    },
    "parameters": {
      "type": "array",
      "description": "Optional additional error information.",
      "items": {
        "type": "object",
        "description": "Optional additional error information."
      }
    }
  },
  "description": "Object containing information about errors reported by services.",
  "title": "ErrorInfo"
}
```

### 404

Not Found

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "errorCode": {
      "type": "string",
      "description": "Error Codes specific to cause of failure.",
      "example": "invalid_user_response"
    },
    "errorMessage": {
      "type": "string",
      "description": "Additional Error Message describing the error.",
      "example": "Application id cannot be null"
    },
    "parameters": {
      "type": "array",
      "description": "Optional additional error information.",
      "items": {
        "type": "object",
        "description": "Optional additional error information."
      }
    }
  },
  "description": "Object containing information about errors reported by services.",
  "title": "ErrorInfo"
}
```

### 409

Conflict

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "errorCode": {
      "type": "string",
      "description": "Error Codes specific to cause of failure.",
      "example": "invalid_user_response"
    },
    "errorMessage": {
      "type": "string",
      "description": "Additional Error Message describing the error.",
      "example": "Application id cannot be null"
    },
    "parameters": {
      "type": "array",
      "description": "Optional additional error information.",
      "items": {
        "type": "object",
        "description": "Optional additional error information."
      }
    }
  },
  "description": "Object containing information about errors reported by services.",
  "title": "ErrorInfo"
}
```

## Security

Requirements

```json
[
  {
    "AdminAPIAuthentication": [
      "ROLES:VIEW"
    ]
  }
]
```
