<?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 Error message: Invalid redirect_uri, Error: 400 in ArcGIS Online Developers Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-developers-questions/error-message-invalid-redirect-uri-error-400/m-p/185991#M221</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am getting the error message below. I am getting this error every time I deploy an WAB/ASP.net application. I was able fix it before but now I am having trouble finding the reason why it is not working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Error: Invalid redirect_uri&lt;/P&gt;&lt;TABLE width="100%"&gt;&lt;TBODY&gt;&lt;TR valign="top"&gt;&lt;TD&gt;&lt;STRONG&gt;ArcGIS Portal Directory&lt;/STRONG&gt; | &lt;A href="https://mdc.maps.arcgis.com/sharing"&gt;Home&lt;/A&gt;&lt;/TD&gt;&lt;TD align="right"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;TABLE width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class=""&gt;Error&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;DIV class=""&gt;&lt;H3&gt;Invalid redirect_uri&lt;/H3&gt;&lt;BR /&gt;&lt;STRONG&gt;Error: &lt;/STRONG&gt;400&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This error happens when &amp;nbsp;I deploy my WAB application to a new server, in this case the staging server. Before I was able to fix this issue changing the IIS&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;authentication settings.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is what &amp;nbsp;I am doing:&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;- create application in Web Application Builder in my workstation,&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;- download the application locally, &amp;nbsp;create a virtual directory in IIS in my workstation pointing to it&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;- open the web application with Visual Studio 2012, using the option "Open web Site"&amp;nbsp;and customize it in my workstation&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;- with Visual Studio 2012, publish the application on the staging server&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;- In the staging server with IIS:&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;. &amp;nbsp;Create IIS virtual directory&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; . Add application&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;. In the authentication settings enable Anonymous and Windows authentication&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; . Under Edit Permissions, Security tab, created account IIS_IUSRS&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;When calling the web application:&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp; - &amp;nbsp;&lt;A class="link-titled" href="http://localhost/s0142960ADOLAASIS/" title="http://localhost/s0142960ADOLAASIS/"&gt;http://[stagingserver]/myapplication&lt;/A&gt;&amp;nbsp; it opens, but after clicking&amp;nbsp;&amp;nbsp;OK on "Please Sign In" to continue, it pops up a window "Error message: Invalid redirect_uri, Error: 400. See attached image file. I tried to open this same rl in several workstations and it fails&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;- &amp;nbsp;if I log on on the staging server and run the application &lt;A class="link-titled" href="http://localhost/s0142960ADOLAASIS/" title="http://localhost/s0142960ADOLAASIS/"&gt;http://localhost/myapplciation/&lt;/A&gt;&amp;nbsp; It works fine.&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;I also did another test, creating an IIS virtual directory and application pointing to the server //[stagingserver]/myapplication &amp;nbsp;and it fails too.&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Any ideas of what I need to check to fix this issue?&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;PS: Some additinal information that might help.&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;The Web Adaptor installed in my is located in another server &lt;A class="link-titled" href="http://s0142099.miamidade.gov:6080" title="http://s0142099.miamidade.gov:6080"&gt;http://[anotherserver]:6080&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 May 2017 17:17:27 GMT</pubDate>
    <dc:creator>JoseSanchez</dc:creator>
    <dc:date>2017-05-24T17:17:27Z</dc:date>
    <item>
      <title>Error message: Invalid redirect_uri, Error: 400</title>
      <link>https://community.esri.com/t5/arcgis-online-developers-questions/error-message-invalid-redirect-uri-error-400/m-p/185991#M221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am getting the error message below. I am getting this error every time I deploy an WAB/ASP.net application. I was able fix it before but now I am having trouble finding the reason why it is not working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Error: Invalid redirect_uri&lt;/P&gt;&lt;TABLE width="100%"&gt;&lt;TBODY&gt;&lt;TR valign="top"&gt;&lt;TD&gt;&lt;STRONG&gt;ArcGIS Portal Directory&lt;/STRONG&gt; | &lt;A href="https://mdc.maps.arcgis.com/sharing"&gt;Home&lt;/A&gt;&lt;/TD&gt;&lt;TD align="right"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;TABLE width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class=""&gt;Error&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;DIV class=""&gt;&lt;H3&gt;Invalid redirect_uri&lt;/H3&gt;&lt;BR /&gt;&lt;STRONG&gt;Error: &lt;/STRONG&gt;400&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This error happens when &amp;nbsp;I deploy my WAB application to a new server, in this case the staging server. Before I was able to fix this issue changing the IIS&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;authentication settings.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is what &amp;nbsp;I am doing:&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;- create application in Web Application Builder in my workstation,&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;- download the application locally, &amp;nbsp;create a virtual directory in IIS in my workstation pointing to it&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;- open the web application with Visual Studio 2012, using the option "Open web Site"&amp;nbsp;and customize it in my workstation&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;- with Visual Studio 2012, publish the application on the staging server&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;- In the staging server with IIS:&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;. &amp;nbsp;Create IIS virtual directory&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; . Add application&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;. In the authentication settings enable Anonymous and Windows authentication&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; . Under Edit Permissions, Security tab, created account IIS_IUSRS&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;When calling the web application:&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp; - &amp;nbsp;&lt;A class="link-titled" href="http://localhost/s0142960ADOLAASIS/" title="http://localhost/s0142960ADOLAASIS/"&gt;http://[stagingserver]/myapplication&lt;/A&gt;&amp;nbsp; it opens, but after clicking&amp;nbsp;&amp;nbsp;OK on "Please Sign In" to continue, it pops up a window "Error message: Invalid redirect_uri, Error: 400. See attached image file. I tried to open this same rl in several workstations and it fails&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;- &amp;nbsp;if I log on on the staging server and run the application &lt;A class="link-titled" href="http://localhost/s0142960ADOLAASIS/" title="http://localhost/s0142960ADOLAASIS/"&gt;http://localhost/myapplciation/&lt;/A&gt;&amp;nbsp; It works fine.&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;I also did another test, creating an IIS virtual directory and application pointing to the server //[stagingserver]/myapplication &amp;nbsp;and it fails too.&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Any ideas of what I need to check to fix this issue?&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;PS: Some additinal information that might help.&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;The Web Adaptor installed in my is located in another server &lt;A class="link-titled" href="http://s0142099.miamidade.gov:6080" title="http://s0142099.miamidade.gov:6080"&gt;http://[anotherserver]:6080&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 May 2017 17:17:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-developers-questions/error-message-invalid-redirect-uri-error-400/m-p/185991#M221</guid>
      <dc:creator>JoseSanchez</dc:creator>
      <dc:date>2017-05-24T17:17:27Z</dc:date>
    </item>
    <item>
      <title>Re: Error message: Invalid redirect_uri, Error: 400</title>
      <link>https://community.esri.com/t5/arcgis-online-developers-questions/error-message-invalid-redirect-uri-error-400/m-p/185992#M222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;FOUND IT!!!!!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I spend several days trying to figure out why I was getting this error. First I focused on the IIS Web application that was deployed to a staging server. In this application I changed several parameters related to IIS, authentication and security permits, but it did not work. Then &amp;nbsp;I copied the application into another server and I was getting the same error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Finally the issue was in the web mapping application located in our &amp;nbsp;[&lt;A class="link-titled" href="http://mdc.maps.arcgis.com" title="http://mdc.maps.arcgis.com"&gt;http://[MyCompany].maps.arcgis.com&lt;/A&gt;&amp;nbsp;] and used by the application in the &amp;nbsp;config.json "appId" . It was referencing another server, not the one I am currently deploying.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;To correct this issues this is what &amp;nbsp;I did:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;- &amp;nbsp;select the tab "Settings" and verify that the value &lt;STRONG&gt;URL&lt;/STRONG&gt;&amp;nbsp;in&lt;/P&gt;&lt;H4 class="" style="color: #4c4c4c; font-weight: 300; font-size: 1.2019rem;"&gt;Web Mapping Application Settings points to your web application.&lt;/H4&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;- Also please check the&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff;"&gt;App Registration&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class="" data-dojo-attach-point="_registration" style="color: #4c4c4c; background-color: #ffffff; margin-top: 0.775rem;"&gt; &lt;/DIV&gt;&lt;P&gt;&lt;BUTTON class="" data-dojo-attach-point="_registeredInfoBtn" style="color: #0079c1; background: white; border: 1px solid #0079c1; font-size: 0.9375rem; padding: 0.31rem 0.9rem;"&gt;Registered Info&lt;/BUTTON&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and add your new server in the list of servers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See attached jpg images for additional information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/354054_WEbMappingApplicationSettingsGeneral.jpg" style="width: 620px; height: 579px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-2 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/354055_WEbMappingApplicatiohnSettingsRegisteredInfo.jpg" style="width: 620px; height: 527px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 May 2017 18:30:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-developers-questions/error-message-invalid-redirect-uri-error-400/m-p/185992#M222</guid>
      <dc:creator>JoseSanchez</dc:creator>
      <dc:date>2017-05-25T18:30:39Z</dc:date>
    </item>
  </channel>
</rss>

