A valid ClientId, Client Secret and tenant URL is required in order to access Sopho's API
- Access to the Sophos Central Dashboard
- Super Admin privileges
- Log in to your Sophos Central Dashboard instance with Super Admin privileges.
- Give the credential a name, description and select the desired access: Service Principal Super Admin https://docs.sophos.com/central/Customer/help/en-us/ManageYourProducts/GlobalSettings/APICredentials/index.html
- Save the ClientId & Client Secret
URL This is the Base URL for where both authentication and queries will be performed. Determine the correct URL by first requesting an access token, then calling WhoAmI:
- Request an access token:
curl --location 'https://id.sophos.com/api/v2/oauth2/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'client_id=<client_id>' \
--data-urlencode 'client_secret=<client_secret>' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'scope=token'- Call WhoAmI with the access token from the previous response:
curl --location 'https://api.central.sophos.com/whoami/v1' \
--header 'Authorization: Bearer <access_token>'The WhoAmI response includes apiHosts.dataRegion.
Use the dataRegion value as the URL to configure here.
ClientId This is the Client Id gathered in step
ClientSecret This is the Client Secret gathered in step 5