Hello - it appears that the Upload Service Definition tool is not honoring the '"groups" setting now at 2.3. This worked at 2.2.x:
arcpy.UploadServiceDefinition_server('C:/ArcProProjects/PortalUpdates/Environmental/' + lyr.name + '.sd', 'My Hosted Services', "","","","","","OVERRIDE_DEFINITION","SHARE_ONLINE","PUBLIC",
"SHARE_ORGANIZATION","Environmental Layers Group")
I can get around it by using the api:
portItem.share(everyone=True,org=True,groups="21afe6b205cf4ff99271b4fe25f3b2d7")
Thanks,
David
Solved! Go to Solution.
Tried everything with UploadServiceDefinition_server, the service definition makes it to the server anything involving sharing is ignore. My service definition is always availeble to me only.