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

In This Topic
    PortalInfo Class
    In This Topic
    Includes information such as the name, logo, featured items and supported protocols (http vs https) for a portal.
    Object Model
    PortalInfo ClassArcGISPortal Class
    Syntax
    public sealed class PortalInfo 
    Public NotInheritable Class PortalInfo 
    Remarks
    If the user is not logged in or if the logged user doesn't belong to an organization, the information concerns the default view of the portal. If the user is logged in or if the Url is an organization custom Url, the information will be specific to the organization that the user belongs to.

    The default view of the portal is dependent on the culture of the user which is obtained from the users profile.

    You may get the current portal info by the ArcGISPortal.GetPortalInfoAsync (extension) method.

    Example
    Portal: Get the "online" portal view for the current user
    //If no-one is signed in, this will be the default view for
    //the anonymous user.
    var online = ArcGISPortalManager.Current.GetPortal(new Uri("http://www.arcgis.com"));
    var portalInfo = await online.GetPortalInfoAsync();
    
    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;
    
    Inheritance Hierarchy

    System.Object
       ArcGIS.Desktop.Core.Portal.PortalInfo

    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also