I've a usecase where I want to add users and devices to one group and assign roles to that group so that a user can only deal with the devices mentioned in the group only and not other devices present in other groups.
While trying to achieve this scenario I tried making a user group (Let's say :User_Group) with the help of the following API
URL- {{url}}/user/{{tenant}}/groups(POST)
Request Body: {
"name" : "User_Group"
}
After this my Group is created. Now I need to add my user(say : Test_User) and devices to this group.
I tried to do this using the following API:
URL-{{url}}/user/{{tenant}}/groups/{groupId}/users but was unable to do this as the API was give Internal Server Error.
Can anyone help me what I’m doing wrong or is there any other way I can achieve this use case?
For group-based access control you can use "inventory roles". With an inventory role, you can specify to which groups a user has access to and what rights he needs.
Check: https://www.cumulocity.com/guides/users-guide/user-and-permissions-management/#inventory