Uploaded image for project: 'Identity'
  1. Identity
  2. ID-8887

Can't Grant Product Admin role via the Grant User Access API

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Low Low
    • Directory - APIs
    • None

      A new endpoint got released which allows Admins to grant product roles to users through the below API endpoint:

      curl --request POST \
        --url 'https://api.atlassian.com/admin/v1/orgs/{orgId}/users/{userId}/roles/assign' \
        --header 'Authorization: Bearer <access_token>' \
        --header 'Content-Type: application/json' \
        --data '{
        "role": "atlassian/user",
        "resource": "ari:cloud:platform::site/70ef3a32-d0da-4e09-b35e-0109f91969c3"
      }'
      

      While this works well for most products, it won't work for Jira Administration (Product Admin role). This is caused by an incorrect resource which returns the following error:

      {"errors":[{"id":"...","code":"ADMIN-UAM-400-5","status":"400","title":"Empty/Invalid Resource","detail":"Cloud Resource is invalid"}]}
      

       

      The incorrect resource is provided via the output of the GET Workspace API. The output looks like:

      "id": "ari:cloud:jira-admin::site/SITE_ID",
      

      The only format accepted by the Grant User Access API is (which is also the only known workaround):

      "role": "atlassian/admin",
      "id": "ari:cloud:jira::site/SITE_ID",
      

            [ID-8887] Can't Grant Product Admin role via the Grant User Access API

            There are no comments yet on this issue.

              Unassigned Unassigned
              ea8de7b38038 Kenneth De Coster
              Affected customers:
              1 This affects my team
              Watchers:
              4 Start watching this issue

                Created:
                Updated: