Skip to content
This repository has been archived by the owner on Mar 31, 2020. It is now read-only.

Does this work with Arcgis Online Enterprise accounts? #339

Open
ghost opened this issue May 18, 2017 · 5 comments
Open

Does this work with Arcgis Online Enterprise accounts? #339

ghost opened this issue May 18, 2017 · 5 comments

Comments

@ghost
Copy link

ghost commented May 18, 2017

Does this work with ArcGIS Online Enterprise accounts? If so, could you provide a snippet of code to get us headed in the right direction? Thank you for your time.

@MikeMillerGIS
Copy link
Member

You can use run the script inside ArcMap so it can use the login token from that. It cannot be used as a stand alone script

@ghost
Copy link
Author

ghost commented May 18, 2017

So using the "getting started" example below, would we simply not need the configuration line or would we still need to provide a username and password?

`import arcrest
from arcresthelper import securityhandlerhelper

config = {'username': 'myusername', 'password': 'myp4ssword'}
token = securityhandlerhelper.securityhandlerhelper(config)
admin = arcrest.manageorg.Administration(securityHandler=token.securityhandler)
content = admin.content
userInfo = content.users.user()
userInfo.folders`

Thanks!

@MikeMillerGIS
Copy link
Member

You can see in this example where the script is digesting ArcMaps token.
https://github.com/Esri/ArcREST/blob/master/tools/src/append_fc_to_fs.py#L108

@ghost
Copy link
Author

ghost commented May 18, 2017

Are you referring to this line ?
securityinfo['security_type'] = 'ArcGIS'#LDAP, NTLM, OAuth, Portal, PKI

We're trying to filter out what we need and what we don't need from that example. Basically what we want to do is download a feature class from AGOL, using an enterprise account.

@MikeMillerGIS
Copy link
Member

Yes, just you need to run it in ArcMap. That line gets the token from ArcMap.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant