<?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: Direct request to arcgis/rest/services succeeds, via webadaptor it responds with 'Invalid token' in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/direct-request-to-arcgis-rest-services-succeeds/m-p/1646007#M42945</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/791720"&gt;@LarissaDrysdale&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;1.&amp;nbsp; What version of ArcGIS Enterprise are you running?&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; Within Portal &amp;gt; Organization &amp;gt; Settings &amp;gt; Servers, is the Administration URL set to the Web Adaptor URL or the 6443 URL?&lt;/P&gt;</description>
    <pubDate>Wed, 27 Aug 2025 11:13:29 GMT</pubDate>
    <dc:creator>JakeSkinner</dc:creator>
    <dc:date>2025-08-27T11:13:29Z</dc:date>
    <item>
      <title>Direct request to arcgis/rest/services succeeds, via webadaptor it responds with 'Invalid token'</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/direct-request-to-arcgis-rest-services-succeeds/m-p/1646001#M42942</link>
      <description>&lt;P&gt;We have the following problem within ArcGIS Enterprise:&lt;/P&gt;&lt;P&gt;If arcgis/rest/services/... is accessed via the webadaptor, the token generated via portal/sharing/generateToken is not considered valid. In other words an Invalid Token repsonse is returned.&lt;/P&gt;&lt;P&gt;We checked:&lt;/P&gt;&lt;P&gt;a. The token has not expired (checked and is therefore accepted by other endpoints as described above).&lt;BR /&gt;b. The same base URL is used when generating the token (i.e., the domain name in both instances).&lt;/P&gt;&lt;P&gt;Below I describe the situations where this problem surfaces in ArcGIS Enterprise in Portal and in ArcGIS Server Manager&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Portal&lt;/STRONG&gt;&lt;BR /&gt;If you have an item on the content page that isn't publicly shared (i.e., with the owner/organization), you can't view it in the map viewer.&lt;BR /&gt;In the developer screen of the browser, we see that the token generated by the Portal via portal/sharing/generateToken is accepted by requests to /arcgis/admin/services/….&lt;BR /&gt;but not by&amp;nbsp;requests to /arcgis/rest/services/…  response {"error":{"code":498,"message":"Invalid Token","details":[]}}&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Server Manager&lt;/STRONG&gt;&lt;BR /&gt;If you log in via &lt;A href="https://domainname/arcgis/manager" target="_blank" rel="noopener"&gt;https://domainname/arcgis/manager&lt;/A&gt;, you get logged out, because the list with services can not be shown.&lt;BR /&gt;In the developer screen of the browser, we see that a token is generated via portal/sharing/generateToken&lt;BR /&gt;this is accepted by requests to requests to arcgis/admin/…&lt;BR /&gt;but not by requests to /arcgis/rest/services/…. it returns an empty response followed by a revokeToken request /portal/sharing/rest/oauth2/revokeToken&lt;/P&gt;&lt;P&gt;If you go to the server manager via &lt;A href="https://domainname:6443/arcgis/manager" target="_blank" rel="noopener"&gt;https://domainname:6443/arcgis/manager&lt;/A&gt;, you can see the list, and I can also click through to a service without any error.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Questions&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;1. Does anyone recognize this behaviour? And how did you resolve this situation?&lt;BR /&gt;2. What specific settings does arcgis/rest/services use to check if the token is valid? In other words:&lt;/P&gt;&lt;OL class="lia-list-style-type-lower-alpha"&gt;&lt;LI&gt;Which settings do we have to check / compair?&lt;/LI&gt;&lt;LI&gt;What could cause a token generated by portal/sharing to not be accepted by arcgis/rest/services?&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Wed, 27 Aug 2025 10:27:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/direct-request-to-arcgis-rest-services-succeeds/m-p/1646001#M42942</guid>
      <dc:creator>LarissaDrysdale</dc:creator>
      <dc:date>2025-08-27T10:27:27Z</dc:date>
    </item>
    <item>
      <title>Re: Direct request to arcgis/rest/services succeeds, via webadaptor it responds with 'Invalid token'</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/direct-request-to-arcgis-rest-services-succeeds/m-p/1646007#M42945</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/791720"&gt;@LarissaDrysdale&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;1.&amp;nbsp; What version of ArcGIS Enterprise are you running?&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; Within Portal &amp;gt; Organization &amp;gt; Settings &amp;gt; Servers, is the Administration URL set to the Web Adaptor URL or the 6443 URL?&lt;/P&gt;</description>
      <pubDate>Wed, 27 Aug 2025 11:13:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/direct-request-to-arcgis-rest-services-succeeds/m-p/1646007#M42945</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2025-08-27T11:13:29Z</dc:date>
    </item>
    <item>
      <title>Re: Direct request to arcgis/rest/services succeeds, via webadaptor it responds with 'Invalid token'</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/direct-request-to-arcgis-rest-services-succeeds/m-p/1646012#M42947</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/10527"&gt;@JakeSkinner&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;1. We are running 11.5&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; The admin url is set to the Web Adaptor URL, so not :6443. It is the same as at our production environment which has no problems (and is still 11.4 by the way)&lt;/P&gt;</description>
      <pubDate>Wed, 27 Aug 2025 11:23:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/direct-request-to-arcgis-rest-services-succeeds/m-p/1646012#M42947</guid>
      <dc:creator>LarissaDrysdale</dc:creator>
      <dc:date>2025-08-27T11:23:27Z</dc:date>
    </item>
    <item>
      <title>Re: Direct request to arcgis/rest/services succeeds, via webadaptor it responds with 'Invalid token'</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/direct-request-to-arcgis-rest-services-succeeds/m-p/1646024#M42951</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/10527"&gt;@JakeSkinner&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;After my reply above, we were thinking:&lt;/P&gt;&lt;P&gt;When portal/sharing/generatetoken creates a token for the arcgis webadaptor address (so domainname &lt;EM&gt;without&lt;/EM&gt; portnumber) then arcgis/rest/services judges that the token is invalid.&lt;/P&gt;&lt;P&gt;And when the token is generated for the direct address (so domainname &lt;EM&gt;with&lt;/EM&gt; portnumber)&amp;nbsp;then arcgis/rest/services judges that the token is valid.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could this be due to a sharedkey somewere being not in sync? Are there different shared keys being used for the route via the webadaptor or direct to arcgis server?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could refederating arcgis server with Portal solve this problem? What happens when we refederate, do we loose data?&lt;/P&gt;</description>
      <pubDate>Wed, 27 Aug 2025 13:30:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/direct-request-to-arcgis-rest-services-succeeds/m-p/1646024#M42951</guid>
      <dc:creator>LarissaDrysdale</dc:creator>
      <dc:date>2025-08-27T13:30:08Z</dc:date>
    </item>
  </channel>
</rss>

