Adobe Experience Platform - Attribute based access control API - Add group to role | Community
Skip to main content
New Participant
August 22, 2023
Solved

Adobe Experience Platform - Attribute based access control API - Add group to role

  • August 22, 2023
  • 1 reply
  • 1070 views

I would like to add a Usergroup to a Role in Adobe Experience Platform though API. I am following the documentation from the link below. The document does't provide clear information on what fields to provide to add a subject to the role.

https://experienceleague.adobe.com/docs/experience-platform/access-control/abac/abac-api/roles.html?lang=en#update-subject-by-role-id

For example, what info goes into the "value" field below in order to add a subject?

 

Is this information documented elsewhere?

{
    "operations": [
      {
        "op": "add",
        "path": "/subjects",
        "value": "New subjects"
      }
    ]
  }

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Karthikeyan3022657234dp

Thanks Nitesh for your response. Looks like both payload and URL mentioned in the document is incorrect. 

 

For other's benefit, here is the correct URL & payload.

 

1. Add User to Role

 

 

 

PATCH https://platform.adobe.io/data/foundation/access-control/administration/roles/{{ROLE_ID}}/subjects [ { "op": "add", "path": "/user", "value": "<userid>" } ]

 

 

 

 

2. Add UserGroup to Role

 

 

 

 

PATCH https://platform.adobe.io/data/foundation/access-control/administration/roles/{{ROLE_ID}}/subjects [ { "op": "add", "path": "/ims-group", "value": "<group-id>" } ]

 

 

 

 

1 reply

nitesh_kumar-1
Employee
August 28, 2023

Hi @karthikeyan3022657234dp ,

 

This documentation update is in progress, the payload should be something like this 

 

 

 

[ { "op": "add", "path": "/user", "value": "adobeid" } ] ​

 

 

This user ID can be retrieved through User management API.
 
 Also, feel free to open a support ticket if this still doesn't work. The documentation of AEP is still evolving, there might be further updates that are yet to be released.
 
Hope this helps!
 
Regards,
Nitesh
 
Karthikeyan3022657234dpAuthorAccepted solution
New Participant
August 29, 2023

Thanks Nitesh for your response. Looks like both payload and URL mentioned in the document is incorrect. 

 

For other's benefit, here is the correct URL & payload.

 

1. Add User to Role

 

 

 

PATCH https://platform.adobe.io/data/foundation/access-control/administration/roles/{{ROLE_ID}}/subjects [ { "op": "add", "path": "/user", "value": "<userid>" } ]

 

 

 

 

2. Add UserGroup to Role

 

 

 

 

PATCH https://platform.adobe.io/data/foundation/access-control/administration/roles/{{ROLE_ID}}/subjects [ { "op": "add", "path": "/ims-group", "value": "<group-id>" } ]