I am attempting to set member categories for individual members using the ArcGIS API for Python in Notebook Server for Portal.
The API docs and posts in the community state that it should be possible to use the "update" method to assign categories to a member. arcgis.gis module | ArcGIS API for Python
The update method has an argument for "categories" as shown in the highlight below.
But, when attempting to assign a property to the argument using the code below, I get the following error.
users = gis.users.search('zrobinson')
users[0].update(categories=['/Categories/ITS'])
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
/tmp/ipykernel_188/103280399.py in <module>
----> 1 users[0].update(categories=['/Categories/ITS'])
TypeError: update() got an unexpected keyword argument 'categories'
However, I can use the same code to update other properties for the user such as description, name, etc. So the update method is recognized but for some reason does not recognize the "categories" argument.
Has anyone had success updating the categories for a user? Someone claimed success in this related post: Solved: Python Assign User Category - Esri Community