Skip to content

User roles ​

Returns the applications and roles assigned to one user, including what each role can do and which service providers it covers.

GET /fieldservicegateway/usermanagement/v3/authorization/users/:userId/app-roles

userId is the user number. An email in the path is accepted and converted to the user number.

Request ​

No body. Put the user in the path.

GET /fieldservicegateway/usermanagement/v3/authorization/users/1001/app-roles

cURL ​

bash
curl --request GET 'https://[BASE_URL]/fieldservicegateway/usermanagement/v3/authorization/users/1001/app-roles' \
  --header 'x-api-key: {{x-api-key}}' \
  --header 'Authorization: {{Authorization}}' \
  --header 'Asurion-correlationid: correlation-id' \
  --header 'Asurion-enduser: end-user' \
  --header 'Asurion-sourcesystem: source-system' \
  --header 'Asurion-serviceprovider: company-id' \
  --header 'Asurion-client: default'

Response ​

200 OK

json
{
  "userId": "1001",
  "applications": [
    {
      "applicationId": "Honeycomb",
      "roles": [
        {
          "roleName": "Technician",
          "roleType": "SP",
          "isSystemRole": false,
          "features": [
            {
              "featureName": "jobmanagement",
              "permission": "Read"
            }
          ],
          "serviceProviderNumbers": [
            {
              "serviceProviderNumber": "10001",
              "locationNumbers": ["20001"]
            }
          ]
        }
      ]
    }
  ]
}
FieldTypeDescription
userIdstringUser that was looked up
applicationsarrayApplications the user can open
applications[].rolesarrayRoles in that application. Omitted when access is for the whole application
roleTypestringSA, SP, or empty when no type is set
isSystemRolebooleantrue for a built-in role
featuresarrayFeature name and the access level, such as Read or Write
serviceProviderNumbersarrayService providers and locations this role covers

Errors ​

StatusCodeWhen
400VALIDATION_ERRORuserId is missing
500INTERNAL_ERRORSomething unexpected failed