ArcGIS API for Python - Group Manager - Create - 403 Error

07-06-2021 04:51 PM
New Contributor II

I would like to use the migration abilities of the API however after the migration.create is called, I receive a 403 error.  I have not idea why the error, I can do other things, such as search and get the item id for the group. 
 = GIS(user etc)
gp = gisconn.groups.get('someid')
result = gp.migration.create(items=self.get_map_ids(),future=False) #produces 403

File "c:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis\", line 1319, in create
res =, params)
File "c:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis\_impl\_con\", line 720, in post
force_bytes=kwargs.pop('force_bytes', False))
File "c:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis\_impl\_con\", line 514, in _handle_response
self._handle_json_error(data['error'], errorcode)
File "c:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\lib\site-packages\arcgis\gis\_impl\_con\", line 536, in _handle_json_error
raise Exception(errormessage)
Exception: You do not have permissions to access this resource or perform this operation.
(Error Code: 403)
0 Kudos
2 Replies
MVP Esteemed Contributor

This error?  BUG-000136399: The error message, “Error Code: 403 Access to admin .. (

don't know it applies, but there is a suggested workaround

... sort of retired...
0 Kudos
New Contributor II

Thanx Dan and I hope you are sort of relaxing.  :)
I am sure that this is related.  In this case I am not using the a domain user in the login but it may be the user that is being used to access the internet, that is referenced here.  I have no idea where I could alter that user other than using the proxy option, which I have already tried; something like below.

portal = "https://azure.myserver/portal"
userid = "enterprise_admin"
pwd = "enterprise_admin_pwd"
gis_init =r"MYUSERNAME:userpassword@"
gisconn=gis(portal,userid,pwd,proxy_host=gis_init, proxy_port=8080)

0 Kudos