Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

To add a user to a role in Adobe

in iHub

  1. Click Create and select an action

  2. Select the action created in this Adobe Exchange JWT to an Access token tutorial as parent.

  3. Select application/json as template

  4. Click Create

  5. You will now have a “Exchange JWT to an Access token” parent and a child action called “Add license”

  6. Select Method POST

  7. Add URL https://usermanagement.adobe.io/v2/usermanagement/action/MY_ORG_NUMBER@AdobeOrg

  8. Add headers

Content-Type

application/json

Accept

application/json

Authorization

Bearer {{access_token}}

note that the access_token var comes from the parent

x-api-key

key found in the Adobe console

  1. Enter body, (note country and the custom field holding the group might differ from your system)

    Code Block
    languagejs
    [{
    "user" : "{{issue.reporter.emailAddress}}",
    "requestID" : "{{issue.key}}",
    "do" : [
      {
        "createFederatedID": {
        "email": "{{issue.reporter.emailAddress}}",
        "country": "SE",
        "firstname": "{{issue.reporter.displayName}}",
        "lastname": "{{issue.reporter.displayName}}",
        "option": "ignoreIfAlreadyExists"
      }
      },
      {
        "add" : {
          "group" : [ "{{issue.customfield_102230}}"]
        }
      }
    ]
    }]
  2. Test with an issue key

  3. Result user in the reporter field gets added in the group specified in the field issue.customfield_102230. note that this Group needs to be in Adobe before this call.

Reference: https://adobe-apiplatform.github.io/umapi-documentation/en/RefOverview.html