ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Core.Portal Namespace / PortalInfo Class / OrganizationId Property
Example Version

OrganizationId Property (PortalInfo)
Gets the id of the organization, if the user belongs to one.
Syntax
public string OrganizationId {get;}
Example
Portal: Get the organization id for the current user
var portal = ArcGISPortalManager.Current.GetPortal(new Uri(portalUri));
var portalInfo = await portal.GetPortalInfoAsync();
var orgid = portalInfo.OrganizationId;
Requirements

Target Platforms: Windows 11, Windows 10

ArcGIS Pro version: 3 or higher.
See Also