Skip to navigation

Get a user's roles

View as Markdown

Returns the roles assigned to a specific user across the projects they belong to.

Only users with hub admin permissions can call this endpoint. To verify a user’s permissions, call GET users.

Note: This operation is forward compatible. Autodesk may add attributes to the response without prior notice, so your app should ignore any attribute it does not recognize.

Authentication

AuthorizationBearer

OAuth 2.0 (2-legged) — application context required.

Client Credentials Flow

Token URL: https://developer.api.autodesk.com/authentication/v2/token

Scopes:

  • account:read — read account and project data
  • account:write — modify account and project data
  • data:read — read data the application can access
OR
AuthorizationBearer

OAuth 2.0 (2-legged with impersonation) — application context with user impersonation required. Send a User-Id header identifying the member to act on behalf of; the token authorizes the application, while the operation is evaluated against that member’s project permissions.

Client Credentials Flow

Token URL: https://developer.api.autodesk.com/authentication/v2/token

Scopes:

  • account:read — read account and project data
  • account:write — modify account and project data
OR
AuthorizationBearer

OAuth 2.0 (3-legged) — user context required. Also accepts a Secure Service Account (SSA) token, which is headless like a two-legged flow but classified as three-legged because it preserves user context.

Authorization Code Flow

Authorization URL: https://developer.api.autodesk.com/authentication/v2/authorize

Token URL: https://developer.api.autodesk.com/authentication/v2/token

Refresh URL: https://developer.api.autodesk.com/authentication/v2/token

Scopes:

  • data:read — read your data
  • account:read — read account and project data
  • account:write — modify account and project data

Path parameters

accountIdstringRequiredformat: "uuid"

The ID of the hub that contains the projects. This corresponds to the hub ID used in the Data Management API, with the “b.” prefix removed. For example, b.c8b0c73d-3ae9 becomes c8b0c73d-3ae9.

userIdstringRequiredformat: "uuidOrAutodeskId"

The ID of the user. To find the ID call GET users. You can use either the Forma ID (id) or the Autodesk ID (autodeskId).

Headers

Accept-LanguagestringOptionalDefaults to en
This header is not currently supported in the hub Admin API.
RegionstringOptional

Specifies the region where your request should be routed. If not set, the request is routed automatically, which may result in a slight increase in latency.

Possible values: US, EMEA. For a complete list of supported regions, see the Regions page.

User-IdstringOptionalformat: "uuidOrAutodeskId"

The ID of a user on whose behalf your request is acting.

Your app has access to all users specified by the administrator in the SaaS integrations UI. Provide this header value to identify the user to be affected by the request.

You can use either the user’s Forma ID (id), or their Autodesk ID (autodeskId).

Note that this header is required for hub Admin POST, PATCH, and DELETE endpoints if you want to use a 2-legged authentication context. This header is optional for hub Admin GET endpoints.

Query parameters

filter[projectId]list of stringsOptional
A list of project IDs. Only results where the user is associated with one or more of the specified projects are returned.
filter[id]list of stringsOptional
Filters roles by their unique ID. You can specify one or more role IDs.
filter[status]list of enumsOptional

Filters roles by their status. Accepts one or more of the following values:

active – The role is currently in use.

inactive – The role has been removed or is no longer in use.

Allowed values:
filter[name]stringOptional

Filters roles by name.

By default, this performs a partial match (case-insensitive).

You can control how the match behaves by using the filterTextMatch parameter. For example, to match only names that start with (startsWith), end with (endsWith), or exactly equal (equals) the provided value.

filterTextMatchenumOptionalDefaults to contains

Specifies how text-based filters should match values in supported fields.

This parameter can be used in any endpoint that supports text-based filtering (e.g., filter[name], filter[jobNumber], filter[companyName], etc.).

Possible values:

contains (default) – Matches if the field contains the specified text anywhere

startsWith – Matches if the field starts with the specified text

endsWith – Matches if the field ends with the specified text

equals – Matches only if the field exactly matches the specified text

Matching is case-insensitive.

Wildcards and regular expressions are not supported.

Allowed values:
fieldslist of enumsOptional

A comma-separated list of response fields to include. Defaults to all fields if not specified.

Use this parameter to reduce the response size by retrieving only the fields you need.

Possible values:

projectIds – Projects where the user holds this role

name – Role name

status – Role status (active or inactive)

key – Internal key used to translate the role name

isImmutable – Indicates whether the role is immutable

createdAt – Timestamp when the role was created

updatedAt – Timestamp when the role was last updated

sortlist of enumsOptionalDefaults to name

Sorts the results by one or more fields.

Each field can be followed by a direction modifier:

asc – Ascending order (default)

desc – Descending order

Possible values: name, createdAt, updatedAt.

Default sort: name asc

Example: sort=name,updatedAt desc

limitintegerOptional>=1Defaults to 20

The maximum number of records to return in the response.

Default: 20

Minimum: 1

Maximum: 200 (If a larger value is provided, only 200 records are returned)

offsetintegerOptional>=0Defaults to 0

The index of the first record to return.

Used for pagination in combination with the limit parameter.

Example: limit=20 and offset=40 returns records 41–60.

Response headers

RateLimit-Remaininginteger

The number of requests remaining in the current rate-limit window.

RateLimit-Valueinteger
The maximum number of requests that the server is willing to accept during the current full minute
Request-IdstringOptional
The unique ID of the request, which can be provided when reporting issues with this endpoint.
Response-TimestringOptional
The time taken to generate the response.

Response

A list of requested roles associated with the user
paginationobjectOptional
Contains pagination details for the records returned by the endpoint.
resultslist of objectsOptional
The requested page of roles associated with the user.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
406
Not Acceptable Error
410
Gone Error
429
Too Many Requests Error
500
Internal Server Error
503
Service Unavailable Error