<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: OAuth2 - SAML on ArcGIS Enterprise - does this give you access to basemaps? in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/oauth2-saml-on-arcgis-enterprise-does-this-give/m-p/1294292#M11866</link>
    <description>&lt;P&gt;I have found something very interesting.&lt;/P&gt;&lt;P&gt;I was working with v200.1 (latest version of the runtime) and was mainly using a pretty standard map initializer.&lt;/P&gt;&lt;PRE&gt;Map myMap = &lt;SPAN class=""&gt;new&lt;/SPAN&gt; Map(BasemapStyle.ArcGISImageryStandard);&lt;/PRE&gt;&lt;P&gt;This base map points to&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Imagery:Standard" target="_blank" rel="noopener"&gt;https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Imagery:Standard&lt;/A&gt;&lt;/P&gt;&lt;P&gt;We have another WPF app that was working but it was using 100.15.0 and it used this map initializer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;Map myMap = new Map(SpatialReferences.WebMercator) { Basemap = Basemap.CreateDarkGrayCanvasVector() };&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You cannot initialize the map in 200.1 using the format above. The method was deprecated even back in 100.15.0 and it tells you to use&amp;nbsp;&lt;STRONG&gt;BasemapStyle.ArcGISDarkGray&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;But&amp;nbsp;BasemapStyle.ArcGISDarkGray points to&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:DarkGray" target="_blank" rel="noopener"&gt;https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:DarkGray&lt;/A&gt;&lt;/P&gt;&lt;P&gt;So I changed my test app to 100.15.0 instead of 200.1&amp;nbsp;&lt;/P&gt;&lt;P&gt;My map will show if I use the following initializer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;Map myMap = new Map(SpatialReferences.WebMercator) { Basemap = Basemap.CreateDarkGrayCanvasVector() };&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but not using &lt;STRONG&gt;BasemapStyle.ArcGISDarkGray&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;This is what the basemap shows when using CreateDarkGrayCanvasVector - no URI at all is set.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ChrisCrowe_0-1685483973300.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/71981iCDA24DE66E3F39FD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ChrisCrowe_0-1685483973300.png" alt="ChrisCrowe_0-1685483973300.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;So I assume that our enterprise arcgis server has no base maps and even if it did I would need to specify a basemap which is on the same server and not use the BaseMapStyle which all go to &lt;A href="https://basemaps-api.arcgis.com" target="_blank" rel="noopener"&gt;https://basemaps-api.arcgis.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;So I either have to leave the app at 100.15.x and have this basemap or upgrade and have no base map!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 30 May 2023 22:04:29 GMT</pubDate>
    <dc:creator>ChrisCrowe</dc:creator>
    <dc:date>2023-05-30T22:04:29Z</dc:date>
    <item>
      <title>OAuth2 - SAML on ArcGIS Enterprise - does this give you access to basemaps?</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/oauth2-saml-on-arcgis-enterprise-does-this-give/m-p/1294201#M11865</link>
      <description>&lt;P&gt;I am creating a WPF application and I am using the simple example online at&amp;nbsp;&lt;A href="https://developers.arcgis.com/net/wpf/sample-code/display-map/" target="_blank" rel="noopener"&gt;Display map | ArcGIS Maps SDK for .NET | ArcGIS Developers&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If I do not specify an API key then it displays a blank window with Powered by ESRI.&lt;/P&gt;&lt;P&gt;If I specify an API KEY using this code then it displays a map as in the example.&lt;/P&gt;&lt;P&gt;public MainWindow()&lt;BR /&gt;{&lt;BR /&gt;InitializeComponent();/Esri.ArcGISRuntime.ArcGISRuntimeEnvironment.ApiKey = "AAPKa6a58defb24a41.............dj6-9WIzn5QX_ECKPq52HH8";&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;In my case I am wanting to use OKTA (SAML) authentication to connect to an ARCGIS enterprise system. I have this working using the following code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;ArcGISRuntimeEnvironment.Initialize((options) =&amp;gt; { });
string serverUrl = "https://portal.domain.com/portal/";
var clientId = "8qOp0LS.......WwhZ6R";
var serverInfo = new ServerInfo(new Uri(serverUrl))
{
 OAuthClientInfo = new OAuthClientInfo(clientId, new Uri(@"vmsUI://auth"), ""),
 TokenAuthenticationType = TokenAuthenticationType.OAuthAuthorizationCode
};

AuthenticationManager.Current.RegisterServer(serverInfo);
AuthenticationManager.Current.OAuthAuthorizeHandler = new OAuthAuthorise();
var currentToken = (OAuthTokenCredential)AuthenticationManager.Current.FindCredential(new Uri(serverUrl), AuthenticationType.Token);
if (currentToken == null)
{
 currentToken = (OAuthTokenCredential)await Task.Run(async () =&amp;gt; await                                      AuthenticationManager.Current.GenerateCredentialAsync(new Uri(serverUrl)), CancellationToken.None);

AuthenticationManager.Current.AddCredential(currentToken);
var portal = await Esri.ArcGISRuntime.Portal.ArcGISPortal.CreateAsync(new Uri(serverUrl), false);
var licenseInfo = await portal.GetLicenseInfoAsync();
var licenseResult = ArcGISRuntimeEnvironment.SetLicense(licenseInfo);
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my case the licenseResult returns a property of LicenseStatus: Valid&lt;/P&gt;&lt;P&gt;I can call ArcGISRuntimeEnvironemnt.GetLicense() and it returns the following&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ChrisCrowe_0-1685473457856.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/71956i66A333EEA74B1FE7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ChrisCrowe_0-1685473457856.png" alt="ChrisCrowe_0-1685473457856.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If I look at ArcGISRuntimeEnvironment.ApiKey it is set to ""&lt;/P&gt;&lt;P&gt;No map is displayed.&lt;/P&gt;&lt;P&gt;In the output window I see&lt;/P&gt;&lt;P&gt;ArcGIS Maps SDK: Load Error: Basemap&lt;BR /&gt;Esri.ArcGISRuntime.Http.ArcGISWebException&lt;BR /&gt;Token Required.&lt;BR /&gt;ArcGIS Maps SDK: Load Error: Map&lt;BR /&gt;Esri.ArcGISRuntime.Http.ArcGISWebException&lt;BR /&gt;Token Required.&lt;/P&gt;&lt;P&gt;So finally my question is what do I need to do to get&amp;nbsp; this to work - I must be missing a step with a token but I do not know what.&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2023 19:06:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/oauth2-saml-on-arcgis-enterprise-does-this-give/m-p/1294201#M11865</guid>
      <dc:creator>ChrisCrowe</dc:creator>
      <dc:date>2023-05-30T19:06:43Z</dc:date>
    </item>
    <item>
      <title>Re: OAuth2 - SAML on ArcGIS Enterprise - does this give you access to basemaps?</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/oauth2-saml-on-arcgis-enterprise-does-this-give/m-p/1294292#M11866</link>
      <description>&lt;P&gt;I have found something very interesting.&lt;/P&gt;&lt;P&gt;I was working with v200.1 (latest version of the runtime) and was mainly using a pretty standard map initializer.&lt;/P&gt;&lt;PRE&gt;Map myMap = &lt;SPAN class=""&gt;new&lt;/SPAN&gt; Map(BasemapStyle.ArcGISImageryStandard);&lt;/PRE&gt;&lt;P&gt;This base map points to&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Imagery:Standard" target="_blank" rel="noopener"&gt;https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Imagery:Standard&lt;/A&gt;&lt;/P&gt;&lt;P&gt;We have another WPF app that was working but it was using 100.15.0 and it used this map initializer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;Map myMap = new Map(SpatialReferences.WebMercator) { Basemap = Basemap.CreateDarkGrayCanvasVector() };&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You cannot initialize the map in 200.1 using the format above. The method was deprecated even back in 100.15.0 and it tells you to use&amp;nbsp;&lt;STRONG&gt;BasemapStyle.ArcGISDarkGray&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;But&amp;nbsp;BasemapStyle.ArcGISDarkGray points to&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:DarkGray" target="_blank" rel="noopener"&gt;https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:DarkGray&lt;/A&gt;&lt;/P&gt;&lt;P&gt;So I changed my test app to 100.15.0 instead of 200.1&amp;nbsp;&lt;/P&gt;&lt;P&gt;My map will show if I use the following initializer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;Map myMap = new Map(SpatialReferences.WebMercator) { Basemap = Basemap.CreateDarkGrayCanvasVector() };&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but not using &lt;STRONG&gt;BasemapStyle.ArcGISDarkGray&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;This is what the basemap shows when using CreateDarkGrayCanvasVector - no URI at all is set.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ChrisCrowe_0-1685483973300.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/71981iCDA24DE66E3F39FD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ChrisCrowe_0-1685483973300.png" alt="ChrisCrowe_0-1685483973300.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;So I assume that our enterprise arcgis server has no base maps and even if it did I would need to specify a basemap which is on the same server and not use the BaseMapStyle which all go to &lt;A href="https://basemaps-api.arcgis.com" target="_blank" rel="noopener"&gt;https://basemaps-api.arcgis.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;So I either have to leave the app at 100.15.x and have this basemap or upgrade and have no base map!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2023 22:04:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/oauth2-saml-on-arcgis-enterprise-does-this-give/m-p/1294292#M11866</guid>
      <dc:creator>ChrisCrowe</dc:creator>
      <dc:date>2023-05-30T22:04:29Z</dc:date>
    </item>
    <item>
      <title>Re: OAuth2 - SAML on ArcGIS Enterprise - does this give you access to basemaps?</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/oauth2-saml-on-arcgis-enterprise-does-this-give/m-p/1294296#M11867</link>
      <description>&lt;P&gt;You are on the right track.&lt;BR /&gt;The services used by the BasemapStyle API under the hood are the standard endpoints from &lt;A href="https://developers.arcgis.com/documentation/mapping-apis-and-services/service-endpoints/#1-standard-endpoint" target="_self"&gt;ArcGIS Location services.&lt;/A&gt;&amp;nbsp;These are accessible via API keys or by ArcGIS Developer or Online accounts. You cannot use ArcGIS Enterprise accounts with these.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2023 22:18:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/oauth2-saml-on-arcgis-enterprise-does-this-give/m-p/1294296#M11867</guid>
      <dc:creator>DiveshGoyal</dc:creator>
      <dc:date>2023-05-30T22:18:46Z</dc:date>
    </item>
    <item>
      <title>Re: OAuth2 - SAML on ArcGIS Enterprise - does this give you access to basemaps?</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/oauth2-saml-on-arcgis-enterprise-does-this-give/m-p/1294322#M11868</link>
      <description>&lt;P&gt;Ah Good to know about the difference here.&lt;/P&gt;&lt;P&gt;So basically we can not upgrade to the new API since it no longer supports the internal base map we are using. Unless we license the base maps as well.&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2023 23:08:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/oauth2-saml-on-arcgis-enterprise-does-this-give/m-p/1294322#M11868</guid>
      <dc:creator>ChrisCrowe</dc:creator>
      <dc:date>2023-05-30T23:08:53Z</dc:date>
    </item>
    <item>
      <title>Re: OAuth2 - SAML on ArcGIS Enterprise - does this give you access to basemaps?</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/oauth2-saml-on-arcgis-enterprise-does-this-give/m-p/1294332#M11870</link>
      <description>&lt;P&gt;You can use your own internal basemaps - it's only the pre-defined arcgis online basemaps (ie the ones that use the BasemapStyle) which require an API Key&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2023 23:59:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/oauth2-saml-on-arcgis-enterprise-does-this-give/m-p/1294332#M11870</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2023-05-30T23:59:33Z</dc:date>
    </item>
    <item>
      <title>Re: OAuth2 - SAML on ArcGIS Enterprise - does this give you access to basemaps?</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/oauth2-saml-on-arcgis-enterprise-does-this-give/m-p/1294336#M11871</link>
      <description>&lt;P&gt;Right makes sense, I assume that the CreateDarkGrayCanvasVector was something internal to the 100.x runtime that is now removed.&lt;/P&gt;&lt;PRE&gt;Basemap.CreateDarkGrayCanvasVector() &lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am sure we can get an API key to use for the base map if we upgrade to 200.x&lt;/P&gt;&lt;P&gt;I also assume that setting the&amp;nbsp;ArcGISRuntimeEnvironment.ApiKey does not affect the OAuth which uses&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;ArcGISRuntimeEnvironment.SetLicense(licenseInfo);&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 May 2023 00:10:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/oauth2-saml-on-arcgis-enterprise-does-this-give/m-p/1294336#M11871</guid>
      <dc:creator>ChrisCrowe</dc:creator>
      <dc:date>2023-05-31T00:10:11Z</dc:date>
    </item>
  </channel>
</rss>

