Query and Export Users and Roles Via the API
search cancel

Query and Export Users and Roles Via the API

book

Article ID: 292307

calendar_today

Updated On:

Products

Carbon Black Cloud Endpoint Standard (formerly Cb Defense) Carbon Black Cloud Audit and Remediation (formerly Cb Live Ops) Carbon Black Cloud Enterprise EDR (formerly Cb Threathunter) Carbon Black Cloud Prevention Carbon Black Cloud Workload

Issue/Introduction

To export the list of Administrators from Settings > Users via the API

Environment

  • Carbon Black Cloud Console: All Versions
    • Audit and Remediation
    • Enterprise EDR
    • Managed Detection
    • Endpoint Standard

Resolution

Via the SDK:

Raw API:

  1. Grab Users and their login ID from the User Management API
    • Note that the Role will show as "deprecated" here
  2. Use the Access Profiles and Grants API, specifically the Get Grant of a Principal (using the Login ID found in Step 1) to get the role
     However, after looking into this more, it'd likely be easier for the team to use our SDK, specifically the export_users_grants.py