Select to view content in your preferred language

Publishing to a Group on Enterprise 11.1

131
1
Jump to solution
a week ago
BrandonMcAlister
Occasional Contributor

Hey everyone, 

I have a script that creates a feature class then publishes the new feature layer to our enterprise portal and overwrites the layer currently published. Everything works as intended except for publishing the layer to the intended group, it only publishes to owner level sharing. I am able to publish it directly to folders under my name. The group ID I am using it coming from the url for the intended group I have used several iterations of the number string found in the url but have been unsuccessful. 

I have used the first code sample under this url. https://pro.arcgis.com/en/pro-app/latest/arcpy/sharing/featuresharingdraft-class.htm#GUID-2B3FAB95-4... 

I am just using the wrong group id or am I missing something else?

#read draft file
docs = DOM.parse(sddraftpath)
key_list = docs.getElementsByTagName('Key')
value_list = docs.getElementsByTagName('Value')

#Sharing level
Share_Organization = "false"
Share_Everyone = "false"
Share_Group = "true"

#Sharing to Deed Notice Inspection Tool Group
GroupID = "a49bff8206a1412991219a39ae4067ed"

#write values
for i in range(key_list.length):
if key_list[i].firstChild.nodeValue == "PackageUnderMyOrg":
value_list[i].firstChild.nodeValue = Share_Organization
if key_list[i].firstChild.nodeValue == "PackageIsPublic":
value_list[i].firstChild.nodeValue = Share_Everyone
if key_list[i].firstChild.nodeValue == "PackageShareGroups":
value_list[i].firstChild.nodeValue = Share_Group
if Share_Group == "true" and key_list[i].firstChild.nodeValue == "PackageGroupIDs":
value_list[i].firstChild.nodeValue = GroupID

Thanks,
Brandon
0 Kudos
1 Solution

Accepted Solutions
BrandonMcAlister
Occasional Contributor

Being made a group manager solved the issue

Thanks,
Brandon

View solution in original post

1 Reply
BrandonMcAlister
Occasional Contributor

Being made a group manager solved the issue

Thanks,
Brandon