Change Owner and Folder

09-10-2019 05:22 PM
MVP Regular Contributor

After cloning a map to a production portal I want to change the map owner and the folder it is in... 

So, first I get the item I want to change in the target portal. Then I try and reassign it.

item.reassign_to('user first and last name', target_folder='test')

Then I get an error: RuntimeError: You do not have permissions to access this resource or perform this operation.

I am an admin on the portal. I have also tried with the site admin user without any luck. What am I doing wrong? Thanks!

0 Kudos
1 Reply
New Contributor III


I modified what is here and this code worked for me:

Our Portal is 10.7 and I'm using the 1.6.2 API version.  The one thing I'd check is the new user id- I had to add the domain (new_user@domain) for it to work.

0 Kudos