<?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: Advice on Authenticating Domain Users (via ADFS) Against Secure Services in ArcGIS Server with JavaScript API Questions</title>
    <link>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/advice-on-authenticating-domain-users-via-adfs/m-p/872372#M676</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am in similar situation, Do you want to share your solution . That would be very helpful. Thanks&lt;/P&gt;&lt;P&gt;My case ArcGIS Server is federated to portal (10.8) which is further using IWA. Now i want to use ArcGIS Server service rest url with my custom app but no option is working out. I was assuming&amp;nbsp;&lt;STRONG style="background-color: #ffffff; border: 0px; font-weight: bold;"&gt;App login approach should work but i was wrong.&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="background-color: #ffffff; border: 0px; font-weight: bold;"&gt;Br&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Jun 2020 05:27:40 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2020-06-18T05:27:40Z</dc:date>
    <item>
      <title>Advice on Authenticating Domain Users (via ADFS) Against Secure Services</title>
      <link>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/advice-on-authenticating-domain-users-via-adfs/m-p/872371#M675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;Hello Community - &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;I am looking for some guidance on how to approach authenticating active directory domain users against a secure ArcGIS Server map service.&amp;nbsp; Knowing there are several approaches, please note the following:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;The application needing to consume the secure ArcGIS Server service is a custom developed web application using the ArcGIS Javascript API (v3.16).&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;The ArcGIS Server (v10.4) hosting the service is federated to ArcGIS Portal (v10.4).The Portal itself authenticates users via ADFS via the "Enterprise Logins via SAML identity provider.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;Being federated, ArcGIS Server now "defers" security to the Portal - and I think THAT is what is making this challenging, if not impossible.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;Consequently, the service itself will only allow access to either everyone (Public) or defined Portal members (via a Portal group). Correct?&amp;nbsp; The members of that particular Portal group are defined via an AD Group.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;Ideally, I would like to expose the secure service to members of that AD Group WITHOUT defining them as Portal members.&amp;nbsp; The service existed before the Portal and it has not been added as a Layer in the Portal.&amp;nbsp; I just want to use the service, but Portal seems to get in the way!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;Additionally, if we &lt;EM&gt;did&lt;/EM&gt; want to make the service available to a Portal user, we want to make sure they are not presented with a second login prompt when they access feature layers exposed in the Portal if they have already authenticated via ADFS.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;Can I even do this with ArcGIS Server federated to the Portal ??&amp;nbsp; Or do I have to drop the federation?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;Some of the approaches tried thus far:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Oauth2.0 via the Javascript API&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I tried the approach mentioned here:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.mymanatee.org/arcgis_js_api/sdk/jssamples/portal_oauth_inline.html" target="_blank"&gt;http://www.mymanatee.org/arcgis_js_api/sdk/jssamples/portal_oauth_inline.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using this method, I was prompted to log into the Portal in order to access the secured services.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;App login approach&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I followed the approach mentioned here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/authentication/accessing-arcgis-online-services/" target="_blank"&gt;https://developers.arcgis.com/authentication/accessing-arcgis-online-services/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Based on this, I was able to get a token, however the token did not appear to work on secured services.&amp;nbsp; It would return "Invalid token" as a dojo script error when the &lt;STRONG&gt;ArcGISDynamicMapServiceLayer &lt;/STRONG&gt;was called in the ArcGIS JavaScript API.&lt;/P&gt;&lt;P&gt;Looking at what is posted below, it does not appear that secured services can use this method.&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/authentication/limitations-of-application-authentication/" target="_blank"&gt;https://developers.arcgis.com/authentication/limitations-of-application-authentication/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Named user approach&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Post to -[portal_url]/arcgissrv/tokens/generateToken&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;In the POST we supplied the following information:&lt;/P&gt;&lt;P&gt;f: "json"&lt;/P&gt;&lt;P&gt;username: [username]&lt;/P&gt;&lt;P&gt;password: [password]&lt;/P&gt;&lt;P&gt;client: "referrer"&lt;/P&gt;&lt;P&gt;referrer: [custom app URL]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When we used a portal account we would get back a token response:&lt;/P&gt;&lt;P&gt;{"token":"5dvEdVwMi4a3LpKfW-02ofyg8fi5bStGiO0tP-S7BlYut3gjMFbdC8TRJnTFS88v","expires":1462567122484}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When we used a domain (AD) account without having a portal account set up we received the message:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{"error":{"code":401,"message":"You are not authorized to access this information","details":"Invalid credentials"}}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 May 2016 20:45:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/advice-on-authenticating-domain-users-via-adfs/m-p/872371#M675</guid>
      <dc:creator>AlexSchafer</dc:creator>
      <dc:date>2016-05-06T20:45:21Z</dc:date>
    </item>
    <item>
      <title>Re: Advice on Authenticating Domain Users (via ADFS) Against Secure Services</title>
      <link>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/advice-on-authenticating-domain-users-via-adfs/m-p/872372#M676</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am in similar situation, Do you want to share your solution . That would be very helpful. Thanks&lt;/P&gt;&lt;P&gt;My case ArcGIS Server is federated to portal (10.8) which is further using IWA. Now i want to use ArcGIS Server service rest url with my custom app but no option is working out. I was assuming&amp;nbsp;&lt;STRONG style="background-color: #ffffff; border: 0px; font-weight: bold;"&gt;App login approach should work but i was wrong.&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="background-color: #ffffff; border: 0px; font-weight: bold;"&gt;Br&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jun 2020 05:27:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/advice-on-authenticating-domain-users-via-adfs/m-p/872372#M676</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-06-18T05:27:40Z</dc:date>
    </item>
  </channel>
</rss>

