<?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: API Key with ArcGIS Enterprise in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/api-key-with-arcgis-enterprise/m-p/1648484#M87592</link>
    <description>&lt;P data-unlink="true"&gt;Did you see this recent post?&lt;BR /&gt;https://community.esri.com/t5/developers-questions/api-key-issues/td-p/1627931&lt;BR /&gt;&lt;BR /&gt;Looks like you already are doing like its solved there.&lt;BR /&gt;But may you find sth. helpful.&lt;BR /&gt;&lt;BR /&gt;For login we&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;useIdentityManager.getCredential(tokenUrl);

IdentityManager.checkAppAccess(tokenUrl, this._clientId ?? 'UNKNOWN');&lt;/LI-CODE&gt;&lt;P data-unlink="true"&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;The WebMap we create this way:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const webMap = new WebMap({ portalItem: { id: webMapId } });

await webMap.load(); &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 08 Sep 2025 08:53:21 GMT</pubDate>
    <dc:creator>SebastianKrings</dc:creator>
    <dc:date>2025-09-08T08:53:21Z</dc:date>
    <item>
      <title>API Key with ArcGIS Enterprise</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/api-key-with-arcgis-enterprise/m-p/1647070#M87568</link>
      <description>&lt;P&gt;An API key has been configured to access the web map with item-level access privileges in an ArcGIS Enterprise deployment secured with IWA. However, when I attempt to access the web map by passing the API key through the token parameter, a Windows Authentication login prompt still appears asking for credentials. I need to know how to suppress this IWA prompt so that the API key can be used directly to access the item. We are using the ArcGIS Maps SDK for JavaScript 4.33 and ArcGIS Enterprise 11.5.&lt;/P&gt;&lt;P&gt;My current code looks like this:&lt;/P&gt;&lt;P&gt;esriConfig.apiKeys.scopes = [&lt;BR /&gt;{&lt;BR /&gt;// The API key value&lt;BR /&gt;token: apiKey,&lt;BR /&gt;// An array of URLs that the API key applies to&lt;BR /&gt;urls: [portalUrl]&lt;BR /&gt;}&lt;BR /&gt;];&lt;/P&gt;&lt;P&gt;const webmap = new WebMap({&lt;BR /&gt;portalItem: {&lt;BR /&gt;id: "&amp;lt;itemid&amp;gt;",&lt;BR /&gt;portal: {&lt;BR /&gt;url: portalUrl&lt;BR /&gt;}&lt;BR /&gt;// apiKey: apiKey&lt;BR /&gt;},&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;await webmap.loadAll();&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;But this throws the error:&lt;/P&gt;&lt;P&gt;message: "Failed to load portal item"&lt;BR /&gt;name: "webmap:load-portal-item"&lt;/P&gt;&lt;P&gt;How are API keys expected to work with ArcGIS Enterprise secured using IWA?&lt;/P&gt;</description>
      <pubDate>Sun, 31 Aug 2025 19:28:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/api-key-with-arcgis-enterprise/m-p/1647070#M87568</guid>
      <dc:creator>vijaybadugu</dc:creator>
      <dc:date>2025-08-31T19:28:59Z</dc:date>
    </item>
    <item>
      <title>Re: API Key with ArcGIS Enterprise</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/api-key-with-arcgis-enterprise/m-p/1648484#M87592</link>
      <description>&lt;P data-unlink="true"&gt;Did you see this recent post?&lt;BR /&gt;https://community.esri.com/t5/developers-questions/api-key-issues/td-p/1627931&lt;BR /&gt;&lt;BR /&gt;Looks like you already are doing like its solved there.&lt;BR /&gt;But may you find sth. helpful.&lt;BR /&gt;&lt;BR /&gt;For login we&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;useIdentityManager.getCredential(tokenUrl);

IdentityManager.checkAppAccess(tokenUrl, this._clientId ?? 'UNKNOWN');&lt;/LI-CODE&gt;&lt;P data-unlink="true"&gt;&lt;SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;The WebMap we create this way:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const webMap = new WebMap({ portalItem: { id: webMapId } });

await webMap.load(); &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Sep 2025 08:53:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/api-key-with-arcgis-enterprise/m-p/1648484#M87592</guid>
      <dc:creator>SebastianKrings</dc:creator>
      <dc:date>2025-09-08T08:53:21Z</dc:date>
    </item>
  </channel>
</rss>

