Drata Users and Roles API

**Users** are are people with access to the Drata platform. **Roles** grant permissions to Users. The [help docs](https://help.drata.com/en/collections/5993507) have more information on the default Roles.

Operations 5

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /roles List roles · List Roles #
Ask an LLM
“What roles are defined in our Drata account?”
“Which permission roles can users be given?”
Tell an agent
List all roles.
Show me every role in the account.
GET /roles/{roleId} Get one role · Get Role #
Ask an LLM
“What does a particular role include?”
“Can I look up a role by its ID?”
Tell an agent
Get role {role}.
Show the full detail of role {role}.
GET /roles/{roleId}/users List users who have a role · List Users with Role #
Ask an LLM
“Who has the admin role?”
“Which users are assigned a specific role?”
Tell an agent
List users with role {role}.
Find users named {last_name} who hold role {role}.
GET /users List users · List Users #
Ask an LLM
“Which users are in our Drata account?”
“Can I search users by first or last name?”
Tell an agent
List all users in the account.
Find users with first name {first_name}.
GET /users/{userId} Get one user · Get User #
Ask an LLM
“What is recorded about a specific user?”
“Can I look up a user by their ID?”
Tell an agent
Get user {user}.
Show the full user record for {user}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/drata:drata-users-and-roles-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

drata-users-and-roles-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Drata Users and Roles API
  description: '### What''s New in V2

    - Support for Custom Fields

    - Get and acknowledge user''s assigned policies

    - Payloads are streamlined to include only the essential information. You can expand related objects and collections using the `expand` query parameter.

    - Cursor-based pagination for greater efficiency and stability with large datasets


    ### Getting Started

    Please visit our help article to learn how to create an API key.


    ### Upgrading From Version 1

    API V2 is designed to provide a faster an more flexible way of accessing Drata. There are several differences from V1:

    - The listing endpoints now use **cursor-based pagination**. This provides faster responses and ensures that all records can be retrieved even, if they are changed during the process.


    ```javascript

    async function fetchAll() {

    // The first request doesn''t send a value for the cursor.

    let cursor = undefined;

    do {

    const query = new URLSearchParams({ cursor });

    const resp = await fetch(

    `https://public-api.drata.com/public/v2/users?${query}`,

    {

    method: ''GET'',

    headers: { Authorization: ''Bearer '' }

    }

    );

    const data = await resp.json();

    console.log(data);


    // If there''s a cursor value returned, then there are more results.

    // Pass that back as a query parameter to get the next page of data.

    cursor = data?.pagination?.cursor;

    } while (cursor)

    }

    fetchAll();

    ```

    - You''ll notice smaller responses. Most endpoints accept an `expand` query parameter that let''s you specify which related objects and collections you want to expand.'
  version: V2
  contact: {}
servers:
- url: https://public-api.drata.com/public/v2
- url: https://public-api.eu.drata.com/public/v2
- url: https://public-api.apac.drata.com/public/v2
tags:


# --- truncated at 32 KB (47 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/drata/refs/heads/main/openapi/drata-users-and-roles-api-openapi.yml