ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Core Namespace / ArcGISPortal Class / EnsureValid Method
Version

EnsureValid Method
Ensure the portal is a valid.
Syntax
public void EnsureValid()
Exceptions
ExceptionDescription
Thrown when an invalid portal is provided as the active portal.
Remarks
The portal is checked against the list of portals managed by the ArcGISPortalManager. If the portal is not in the list of portals an exception is thrown
Requirements

Target Platforms: Windows 11, Windows 10

ArcGIS Pro version: 3 or higher.
See Also