<?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 Using OAuth/tokens to get secured service from on-premise Portal???? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-oauth-tokens-to-get-secured-service-from-on/m-p/525582#M49011</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to access a webmap from our on-premise portal in a javascript app.&amp;nbsp; Unfortunately, all of the examples in esri documentation are to access ArcGIS Online data.&amp;nbsp; They say "You can also do this with onpremise portals" but there's exactly zero documentation or examples on how to do so.&amp;nbsp; Does anyone have any code examples?&amp;nbsp; I'm tearing my hair out trying to figure it out, but nothing I'm trying is working.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Jul 2019 18:51:27 GMT</pubDate>
    <dc:creator>KarenEllett</dc:creator>
    <dc:date>2019-07-01T18:51:27Z</dc:date>
    <item>
      <title>Using OAuth/tokens to get secured service from on-premise Portal????</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-oauth-tokens-to-get-secured-service-from-on/m-p/525582#M49011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to access a webmap from our on-premise portal in a javascript app.&amp;nbsp; Unfortunately, all of the examples in esri documentation are to access ArcGIS Online data.&amp;nbsp; They say "You can also do this with onpremise portals" but there's exactly zero documentation or examples on how to do so.&amp;nbsp; Does anyone have any code examples?&amp;nbsp; I'm tearing my hair out trying to figure it out, but nothing I'm trying is working.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jul 2019 18:51:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-oauth-tokens-to-get-secured-service-from-on/m-p/525582#M49011</guid>
      <dc:creator>KarenEllett</dc:creator>
      <dc:date>2019-07-01T18:51:27Z</dc:date>
    </item>
    <item>
      <title>Re: Using OAuth/tokens to get secured service from on-premise Portal????</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-oauth-tokens-to-get-secured-service-from-on/m-p/525583#M49012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Karen,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry to hear about the trouble.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think you're looking for the portalUrl property:&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#portalUrl"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#portalUrl&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have this doc'ed in some samples to use a resource from your own Portal:&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/sandbox/index.html?sample=webmap-basic"&gt;https://developers.arcgis.com/javascript/latest/sample-code/sandbox/index.html?sample=webmap-basic&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jul 2019 19:47:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-oauth-tokens-to-get-secured-service-from-on/m-p/525583#M49012</guid>
      <dc:creator>Noah-Sager</dc:creator>
      <dc:date>2019-07-01T19:47:33Z</dc:date>
    </item>
    <item>
      <title>Re: Using OAuth/tokens to get secured service from on-premise Portal????</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-oauth-tokens-to-get-secured-service-from-on/m-p/525584#M49013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've found and tried with that example.&amp;nbsp; However, the issue is that the services and such are secured.&amp;nbsp; Portal is federated.&amp;nbsp; When I try to access the webmap using just the esriConfig.portalUrl, I get a 401 error saying unauthorized; i'm assuming i need to somehow generate and use a token for this, but I can find zero examples. To be clear, I only get that 401 error when I try to access it in code; if i simply put the url into my browser directly, it allows me to access it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jul 2019 20:02:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-oauth-tokens-to-get-secured-service-from-on/m-p/525584#M49013</guid>
      <dc:creator>KarenEllett</dc:creator>
      <dc:date>2019-07-01T20:02:05Z</dc:date>
    </item>
    <item>
      <title>Re: Using OAuth/tokens to get secured service from on-premise Portal????</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-oauth-tokens-to-get-secured-service-from-on/m-p/525585#M49014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you prompted to enter a username and password? For secure resources, it should automatically prompt you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another option would be to use a self-hosted proxy to authenticate for you:&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/guide/proxies/"&gt;https://developers.arcgis.com/javascript/latest/guide/proxies/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Using an app login or a user login:&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/guide/secure-resources/#application-logins"&gt;https://developers.arcgis.com/javascript/latest/guide/secure-resources/#application-logins&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jul 2019 20:46:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/using-oauth-tokens-to-get-secured-service-from-on/m-p/525585#M49014</guid>
      <dc:creator>Noah-Sager</dc:creator>
      <dc:date>2019-07-01T20:46:21Z</dc:date>
    </item>
  </channel>
</rss>

