Admin

Get user-to-role report (U2R)

Changed on

Export the user-to-role (U2R) mapping for access reviews.

  • Grain: one row per user, role, and organizational unit
  • Active rows (User Active Status / User Role Active Status = 1): live UserRole assignments
  • Inactive rows (status = 0): pending company invitations, including Invite Expired and Invite Sent, plus the latest deleted-user snapshot per email
  • Precedence: a live assignment for an email is status 1 only (no duplicate inactive row); pending invitations win over deleted snapshots for the same email
  • Blank fields: Department is always an empty string
  • UserID: SSO login email (same as UserEmail)
  • Created / Modified: from the live role assignment for active rows; from the invitation or deleted-user snapshot for inactive rows
  • CreatedBy / ModifiedBy: actor emails when known (granting admin, inviter, or last role editor). Deleted snapshots leave CreatedBy blank

Requires an API key whose owner currently has company Administrator or workspace Administrator access.

get/admin/user-to-roles

Request

  • Base URL
    https://api.unravelcarbon.com/api/v1
  • Auth
    HTTP bearer

Headers

Authorizationstring required
Example:Bearer <your_api_key>

Bearer token (API Key)

Response

User-to-role report

Example response

{
  "data": [
    {
      "UserID": "ada@example.com",
      "User": "Ada Admin",
      "UserEmail": "ada@example.com",
      "Rolename": "Admin",
      "Created": "01/01/2026",
      "Modified": "15/08/2026",
      "CreatedBy": "admin@example.com",
      "ModifiedBy": "admin@example.com",
      "LastLoginDateTime": "15/Aug/2026 09:30:00",
      "LastLogoutDateTime": "15/Aug/2026 17:00:00",
      "User Active Status": 1,
      "User Role Active Status": 1
    }
  ]
}

Changes

    • warning

      removed the optional property data/items/User Active Status (0 equal inactive, 1 equal active) from the response with the status

    • warning

      removed the optional property data/items/User Role Active Status (0 equal inactive, 1 equal active) from the response with the status

    • info

      added the optional property data/items/User Active Status to the response with the status

    1 more change in this revision