Skip to content

Get an admin by ID

GET/admins/{adminId}

Organization API · Organization Admins

Get organization administrator details by ID.

Required permissionaccount_management:read

Parameters

Name In Type Required Description
X-Organization-ID header string (uuid) Yes Organization ID.
adminId path string Yes Admin ID.

Request samples

curl -X GET "https://api.central.sophos.com/organization/v1/admins/<adminId>" -H "Authorization: Bearer <access-token>" -H "X-Organization-ID: <organization-id>"

import requests

response = requests.get(
    "https://api.central.sophos.com/organization/v1/admins/<adminId>",
    headers={
        "Authorization": "Bearer <access-token>",
        "X-Organization-ID": "<organization-id>",
    },
)
print(response.json())

$headers = @{
    "Authorization" = "Bearer <access-token>"
    "X-Organization-ID" = "<organization-id>"
}
Invoke-RestMethod -Method GET -Uri "https://api.central.sophos.com/organization/v1/admins/<adminId>" -Headers $headers

package main

import (
    "fmt"
    "io"
    "net/http"
)

func main() {
    req, err := http.NewRequest("GET", "https://api.central.sophos.com/organization/v1/admins/<adminId>", nil)
    if err != nil {
        panic(err)
    }
    req.Header.Set("Authorization", "Bearer <access-token>")
    req.Header.Set("X-Organization-ID", "<organization-id>")

    resp, err := http.DefaultClient.Do(req)
    if err != nil {
        panic(err)
    }
    defer resp.Body.Close()

    body, _ := io.ReadAll(resp.Body)
    fmt.Println(string(body))
}

const response = await fetch("https://api.central.sophos.com/organization/v1/admins/<adminId>", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <access-token>",
    "X-Organization-ID": "<organization-id>",
  },
});
const data = await response.json();
console.log(data);

Responses

200 — Details of the requested organization administrator.

Response fields

idstring (uuid)required
Administrator ID.
usernamestring (email)required
Administrator username (email).
profileobjectrequired
Profile information for organization administrator.
Show child attributesHide child attributes
namestringrequired
Full name.
firstNamestringrequired
First name.
lastNamestringrequired
Last name.
phonestring
Phone number.
mobilestring
Mobile phone number.
faxstring
Fax number.
activebooleanrequired
Whether the administrator is active.
primarybooleanrequired
Whether this is the primary administrator for the account.
roleAssignmentsarray of objectrequired
Administrator's role assignments.
Role assignment.
Show child attributesHide child attributes
idstring (uuid)required
Role assignment ID.
roleIdstring (uuid)required
Role ID.
roleNamestring
Role name.
scopeobjectrequired
Role assignment scope.
Show child attributesHide child attributes
typestringrequired
Role assignment scope type.
Must be one of: tenant, allManagedTenants, self, tenantGroup.
idstring (uuid)
Tenant ID. Optional or not present when type is allManagedTenants or self.
namestring
Tenant name. Optional or not present when type is allManagedTenants or self.

Errors

Status Meaning
404 Can't find admin.
500 Unexpected error.

All error responses share the same shape — see the error response object.

Response examples

200

{
  "id": "00000000-0000-0000-0000-000000000000",
  "username": "user@example.com",
  "profile": {
    "name": "string",
    "firstName": "string",
    "lastName": "string",
    "phone": "string",
    "mobile": "string",
    "fax": "string"
  },
  "active": true,
  "primary": false,
  "roleAssignments": [
    {
      "id": "00000000-0000-0000-0000-000000000000",
      "roleId": "00000000-0000-0000-0000-000000000000",
      "roleName": "string",
      "scope": {
        "type": "tenant",
        "id": "00000000-0000-0000-0000-000000000000",
        "name": "string"
      }
    }
  ]
}

See the guide for a narrative walkthrough of this API.