Hello team,
I am trying to add a user to a Division using the Platform API and Python SDK. All I want to do is just assign a user to a Division, I don't want to add them to a role as those are already set up to be inherited through groups and they span across Divisions. Even if it is possible to do while creating a user, that would be helpful as well.
Currently I am creating a user using the PureCloudPlatformClientV2.CreateUser() and then sending that user through the PureCloudPlatformClientV2.UsersApi(apiclient).post_user() essentially like this:
user = PureCloudPlatformClientV2.CreateUser()
user.name = name
user.email = email
etc.
PureCloudPlatformClientV2.UsersApi(apiclient_info).post_user(user)
And it works perfectly. However, when I try to add the line:
user.division_id = division_id
I get an error saying I am
"missing the following permission(s): [directory:user:add:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx]"
I confess, when I attempted this approach, I did not have high hopes because I could not find anywhere in the API documentation about solely assigning a User to a Division. I could find places where you could add a Role and Division to a User but not just the Division.
If anyone could provide guidance on how to go about this, the location of the documentation pertaining to this action, or even confirmation that this is currently not possible via the API, that would be wonderful. Thank you so much!