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

In This Topic
    OrganizationId Property (PortalInfo)
    In This Topic
    Gets the id of the organization, if the user belongs to one.
    Syntax
    public string OrganizationId {get;}
    Public ReadOnly Property OrganizationId As String
    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