Select to view content in your preferred language

login to ORGANIZATIONAL portal via Arcgis Pro 3.2 via python notebook

281
7
Jump to solution
4 weeks ago
KevinPreston
New Contributor

How do I login to my organizational portal?  I used the same credentials I always use, but the portal does not recognize me.  Am I using the wrong url, or is there some extra parameters needed for organizational login?

Attempting to login to organizational portal (https://osugisci.maps.arcgis.com/home/index.html) within the Arcgis Pro 3.2.  I followed the 'Accessing Data in a Portal Using ArcGIS API for Python' tutorial at Esri's training website, although they only have tutorial for Pro 3.0 and Pro 3.1.  I am using python in the notebook:

KevinPreston_2-1720202678092.png

The error:

KevinPreston_1-1720202552505.png

 

0 Kudos
1 Solution

Accepted Solutions
CodyPatterson
Regular Contributor

Hey @KevinPreston 

Are you logged into ArcGIS Pro with the account that you'd like to use in the Notebook?

If so, attempt this and see what the outcome would be:

CodyPatterson_0-1720438411217.png

This connects to the home portal that is associated with the logged-in account, it is essentially identical to the method you are trying.

Hope that helps!

Cody

View solution in original post

0 Kudos
7 Replies
jcarlson
MVP Esteemed Contributor

Just use the basic portal URL, no need to elaborate beyond the .com.

gis = GIS("https://osugisci.maps.arcgis.com", "user", "pass")

Also, when it's just an AGOL org, you can leave it at "https://arcgis.com" and should still work, since your username / password is for AGOL as a whole. It will pick up your org once you're logged in.

- Josh Carlson
Kendall County GIS
0 Kudos
KevinPreston
New Contributor

The proposal doesn't work.

0 Kudos
jcarlson
MVP Esteemed Contributor

Can you try this and report on what it shows you? This is connecting to your org as an anonymous user:

from arcgis.gis import GIS
gis = GIS('https://osugisci.maps.arcgis.com')
print(gis)

Here's what I see:

jcarlson_0-1720444316291.png

In other words, it's not a problem with connecting to the organizational AGOL, it's literally what the error message is showing you, a problem with your credentials.

- Josh Carlson
Kendall County GIS
0 Kudos
KevinPreston
New Contributor

here's my output.  To rephrase my process: I'm logged in to the arcgis pro 3.2 application (remotely via school's Citrix application), then I start the notebook from within the arcgis pro 3.2, then using the same credentials used to access the arcgis pro 3.2, I login to 'GIS' via python-notebook, but the authentication process is seen as invalid.

KevinPreston_0-1720538748629.png

KevinPreston_1-1720538791261.png

 

0 Kudos
CodyPatterson
Regular Contributor

Hey @KevinPreston 

Are you logged into ArcGIS Pro with the account that you'd like to use in the Notebook?

If so, attempt this and see what the outcome would be:

CodyPatterson_0-1720438411217.png

This connects to the home portal that is associated with the logged-in account, it is essentially identical to the method you are trying.

Hope that helps!

Cody

0 Kudos
KevinPreston
New Contributor

It seems to be working.  I restarted a new notebook without attempting to login via the notebook.  As you allude to, it seems that something already detects I'm logged in via Arcgis pro 3.2:

KevinPreston_2-1720539534976.png

 

 

0 Kudos
CodyPatterson
Regular Contributor

Hey @KevinPreston 

Sounds great, glad to see things are working!

Cody

0 Kudos