list content for group

400
1
03-29-2018 11:00 AM
annegrimes2
New Contributor II

I want to list all the feature layers for a group, and export them to a csv file.

But I received an authentication error when I try to list the content for the group

(I am not signed into the site. It is a public access site.)

      

from arcgis.gis import GIS

groups = gis.groups.search('title:Mygroup')

groups

groups1 = groups[0]

groups1.access

groups1.content()

 

1 Reply
KaiSteinicke1
Esri Contributor

Is the GIS using Integrated Windows Authentication (IWA)?

"If no url is provided, ArcGIS Online is used. If username/password or key/cert files are not provided, the currently logged-in user’s credentials (IWA) or anonymous access is used."

Web-tier-authentication-secured-with-IWA

If you would use this syntax on an IWA secured portal, it would try to authenticate with your current credentials and might fail.

print("\n\nIntegrated Windows Authentication using NTLM or Kerberos") 
gis = GIS("https://portalname.domain.com/webcontext") 
print("Logged in as: " + gis.properties.user.username)‍‍‍‍‍‍
Integrated Windows Authentication using NTLM or Kerberos Logged in as: username@DOMAIN

If not, this should actually work just fine.