サマリー
The SignInToPortal function allows you to sign in to a portal.
説明
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.
構文
SignInToPortal (portal_url, username, password)
パラメーター | 説明 | データ タイプ |
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 |
データ タイプ | 説明 |
Dictionary | A dictionary of key value pairs for expires, referer, and token. |
コードのサンプル
import arcpy
arcpy.SignInToPortal(arcpy.GetActivePortalURL(), 'username', 'password')