Version Control User Identities are the external accounts your version control providers report, linked to Drata Users. Use the actions endpoint to link or unlink a User, to mark an identity a service account, and to acknowledge or retract write and production code push access. Acknowledging access records that it is approved, which clears the matching monitoring test. Infrastructure accounts are documented separately under Infrastructure User Identities.
List the external accounts reported by your version control Connections.
🔒 Requires Connections: Manage Version Control User Identities permission.
Malformed data and/or validation errors
Invalid Authorization
You are not allowed to perform this action
You must accept the Drata terms and conditions to use the API
Internal server error
{- "data": [
- {
- "id": 1,
- "identityId": "1a2b3c",
- "username": "jdoe",
- "connectedAt": "2025-07-01T16:45:55.246Z",
- "disconnectedAt": "2025-07-01T16:45:55.246Z",
- "serviceAccount": "2025-07-01T16:45:55.246Z",
- "serviceAccountReason": "This user is used to deploy code",
- "hasMfa": true,
- "lastCheckedAt": "2025-07-01T16:45:55.246Z",
- "userId": 0,
- "connectionId": 0,
- "createdAt": "2025-07-01T16:45:55.246Z",
- "updatedAt": "2025-07-01T16:45:55.246Z",
- "user": {
- "id": 1,
- "firstName": "Sally",
- "lastName": "Smith",
- "createdAt": "2025-07-01T16:45:55.246Z",
- "updatedAt": "2025-07-01T16:45:55.246Z"
}, - "serviceAccountDesignator": {
- "id": 1,
- "firstName": "Sally",
- "lastName": "Smith",
- "createdAt": "2025-07-01T16:45:55.246Z",
- "updatedAt": "2025-07-01T16:45:55.246Z"
}, - "connection": {
- "id": "1",
- "clientType": "GOOGLE",
- "clientId": "drata.com",
- "clientAlias": "My-connection-alias-1",
- "state": "ACTIVE",
- "createdAt": "2025-07-01T16:45:55.246Z",
- "updatedAt": "2025-07-01T16:45:55.246Z",
- "connectedAt": "2025-07-01T16:45:55.246Z",
- "failedAt": "2025-07-01T16:45:55.246Z",
- "deletedAt": "2025-07-01T16:45:55.246Z"
}, - "writeAccess": "2025-07-01T16:45:55.246Z",
- "pushProductionCodeAccess": "2025-07-01T16:45:55.246Z"
}
], - "pagination": {
- "cursor": "string",
- "totalCount": 0
}
}Get the full detail of a Version Control User Identity.
🔒 Requires Connections: Manage Version Control User Identities permission.
Invalid Authorization
You are not allowed to perform this action
Not Found
You must accept the Drata terms and conditions to use the API
Internal server error
{- "id": 1,
- "identityId": "1a2b3c",
- "username": "jdoe",
- "connectedAt": "2025-07-01T16:45:55.246Z",
- "disconnectedAt": "2025-07-01T16:45:55.246Z",
- "serviceAccount": "2025-07-01T16:45:55.246Z",
- "serviceAccountReason": "This user is used to deploy code",
- "hasMfa": true,
- "lastCheckedAt": "2025-07-01T16:45:55.246Z",
- "userId": 0,
- "connectionId": 0,
- "createdAt": "2025-07-01T16:45:55.246Z",
- "updatedAt": "2025-07-01T16:45:55.246Z",
- "user": {
- "id": 1,
- "firstName": "Sally",
- "lastName": "Smith",
- "createdAt": "2025-07-01T16:45:55.246Z",
- "updatedAt": "2025-07-01T16:45:55.246Z"
}, - "serviceAccountDesignator": {
- "id": 1,
- "firstName": "Sally",
- "lastName": "Smith",
- "createdAt": "2025-07-01T16:45:55.246Z",
- "updatedAt": "2025-07-01T16:45:55.246Z"
}, - "connection": {
- "id": "1",
- "clientType": "GOOGLE",
- "clientId": "drata.com",
- "clientAlias": "My-connection-alias-1",
- "state": "ACTIVE",
- "createdAt": "2025-07-01T16:45:55.246Z",
- "updatedAt": "2025-07-01T16:45:55.246Z",
- "connectedAt": "2025-07-01T16:45:55.246Z",
- "failedAt": "2025-07-01T16:45:55.246Z",
- "deletedAt": "2025-07-01T16:45:55.246Z"
}, - "writeAccess": "2025-07-01T16:45:55.246Z",
- "pushProductionCodeAccess": "2025-07-01T16:45:55.246Z"
}List the actions currently performable on a Version Control User Identity. The set depends on its state and on the caller: a service account cannot be linked to a User until it is unmarked, and actions the caller lacks permission for are omitted.
🔒 Requires Connections: Manage Version Control User Identities permission.
Invalid Authorization
You are not allowed to perform this action
Not Found
You must accept the Drata terms and conditions to use the API
Internal server error
{- "data": [
- {
- "action": "linkUser",
- "label": "Link User",
- "description": "Link this external account to a Drata User",
- "payloadSchema": [
- {
- "name": "reason",
- "type": "string",
- "required": true,
- "description": "Reason for requesting changes"
}
]
}
]
}Perform an action on a Version Control User Identity. markServiceAccount also clears any linked User and requires a reason. linkUser requires a userId. Acknowledging write or production code push access records the access as approved, which clears the matching monitoring test.
🔒 Requires Connections: Manage Version Control User Identities, Connections: Manage Version Control User Identities, Connections: Manage Version Control User Identities permission.
Malformed data and/or validation errors
Invalid Authorization
You are not allowed to perform this action
Not Found
There is a conflict in the business rules with this request
You must accept the Drata terms and conditions to use the API
Internal server error
{- "action": "linkUser",
- "userId": 1,
- "reason": "This user is used to deploy code"
}{- "id": 1,
- "identityId": "1a2b3c",
- "username": "jdoe",
- "connectedAt": "2025-07-01T16:45:55.246Z",
- "disconnectedAt": "2025-07-01T16:45:55.246Z",
- "serviceAccount": "2025-07-01T16:45:55.246Z",
- "serviceAccountReason": "This user is used to deploy code",
- "hasMfa": true,
- "lastCheckedAt": "2025-07-01T16:45:55.246Z",
- "userId": 0,
- "connectionId": 0,
- "createdAt": "2025-07-01T16:45:55.246Z",
- "updatedAt": "2025-07-01T16:45:55.246Z",
- "user": {
- "id": 1,
- "firstName": "Sally",
- "lastName": "Smith",
- "createdAt": "2025-07-01T16:45:55.246Z",
- "updatedAt": "2025-07-01T16:45:55.246Z"
}, - "serviceAccountDesignator": {
- "id": 1,
- "firstName": "Sally",
- "lastName": "Smith",
- "createdAt": "2025-07-01T16:45:55.246Z",
- "updatedAt": "2025-07-01T16:45:55.246Z"
}, - "connection": {
- "id": "1",
- "clientType": "GOOGLE",
- "clientId": "drata.com",
- "clientAlias": "My-connection-alias-1",
- "state": "ACTIVE",
- "createdAt": "2025-07-01T16:45:55.246Z",
- "updatedAt": "2025-07-01T16:45:55.246Z",
- "connectedAt": "2025-07-01T16:45:55.246Z",
- "failedAt": "2025-07-01T16:45:55.246Z",
- "deletedAt": "2025-07-01T16:45:55.246Z"
}, - "writeAccess": "2025-07-01T16:45:55.246Z",
- "pushProductionCodeAccess": "2025-07-01T16:45:55.246Z"
}