SignInToPortal

Resumen

The SignInToPortal function allows you to sign in to a portal.

Debate

To share content or run Ready To Use Tools, you must be signed into a portal. Your portal can be either ArcGIS Enterprise or ArcGIS Online.

To add a portal connection, click the Project tab on the ribbon and click the Portals page.

SignInToPortal will add the portal URL to your portal connections, if not already included, sign in, and set the portal to active. If executed in the Python window, the portal will be set as the active portal, if different, and add it to the portal connections for future ArcGIS Pro or stand-alone Python sessions. However, if executed in a stand-alone Python session, the portal information is used only for the duration of the active Python session.

Only portal users or accounts based on built-in security are supported; username and password are required parameters.

Sintaxis

SignInToPortal (portal_url, username, password)
ParámetroExplicaciónTipo de datos
portal_url

The URL of the portal to be signed in to.

String
username

The user name of the user signing in to the portal.

String
password

The password of the user signing in to the portal.

String
Valor de retorno
Tipo de datosExplicación
Dictionary

A dictionary of key value pairs for expires, referer, and token.

Muestra de código

SignInToPortal example
import arcpy

arcpy.SignInToPortal(arcpy.GetActivePortalURL(), 'username', 'password')

Temas relacionados