Trying to authenticate without user name and password

07-21-2017 04:40 PM
New Contributor II

I am scripting a scheduled job to author and update content in AGOL - Hosted Feature layer. my enterprise AGOL enterprise uses federated office 365 login so I can’t just username and password flow.


So the best option is to create a app in AGOL and get the appid and appsecret and authenticate. (previously i make own my rest calls to get the token and do other stuff )


API documentation

class arcgis.gis.GIS(url=Noneusername=Nonepassword=Nonekey_file=Nonecert_file=Noneverify_cert=Trueset_active=Trueclient_id=Noneprofile=None)


there is no way to pass the client secret in this above flow. even i tried put  client secret in place of password it opens up the web browser and after successful login it returns a token then i need to manually paste that with my script prompt - which is not ideal since i am developing a scheduled task. (if Enterprise AGOL uses federated login to office365 then this method seems to returns wrong token - I think it’s a bug)


API would be more versatile  if there a way to set the token, I can make my own rest calls and generate the token and pass the token to api. because now api is not usable for any  of my automation use cases for enterprise AGOL.  


Tags (1)
0 Kudos
0 Replies