ArcGIS Pro 3.7 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 ReadOnly Property OrganizationId As String
    public string OrganizationId {get;}
    Example
    Portal: Get the organization id for the current user
    {
      var myPortal = ArcGISPortalManager.Current.GetPortal(new Uri("https://machine.domain.com/portal/"));
      var portalInfo = await myPortal.GetPortalInfoAsync();
      var orgid = portalInfo.OrganizationId;
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also