Hi,
I am writing a simple WPF application to view a webmap that is only available for my organization. I have had issues finding example code for how to authenticate to be able to do that. I have used the examples I have found, but cannot make it work. Any ideas? This is what I have so far.
private async Task SetupMap()
{
Esri.ArcGISRuntime.ArcGISRuntimeEnvironment.ApiKey = "*****";
ArcGISPortal portal = await ArcGISPortal.CreateAsync();
PortalItem mapItem = await PortalItem.CreateAsync(portal, "****");
Map map = new Map(mapItem);
this.Map = map;
}