Get the currently active portal. This is the portal that has been set as the Active Portal
either via the API or on the "Portals" backstage tab.
ArcGISPortalManager: Get the Current Active Portal
var active_portal = ArcGISPortalManager.Current.GetActivePortal();
string uri = active_portal.PortalUri.ToString();
Target Platforms: Windows 11, Windows 10
ArcGIS Pro version: 3 or higher.