ArcGIS Pro 2.8 API Reference Guide
GetActivePortal Method

ArcGIS.Desktop.Core Namespace > ArcGISPortalManager Class : GetActivePortal Method
Get the currently active portal. This is the portal that has been set as the Active Portal either via the API or on the "Portals" backstage tab.
Syntax
public ArcGISPortal GetActivePortal()
Public Function GetActivePortal() As ArcGISPortal

Return Value

Remarks
If an active portal has never been set then, by default, the active portal will be ArcgisOnline
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

ArcGISPortalManager Class
ArcGISPortalManager Members