ERROR

400: Invalid redirect_uri

Last Published: April 19, 2023

Error Message

Accessing the Portal for ArcGIS homepage fails with the following error:

Error: 
Error 400: Invalid redirect_uri
Picture of the invalid uri error page

Cause

There are two scenarios that can lead to the error.

Scenario 1: Upgrading ArcGIS Server federated with Portal for ArcGIS

When upgrading a server federated with Portal for ArcGIS to a newer version, users must open the ArcGIS Server Manager (http://server.internaldomain.com:6080/arcgis/manager) and accept the prompt to continue the upgrade. In some cases, this process results in being redirected to the federated Portal for ArcGIS page. For more information, refer to the following web help document, Portal for ArcGIS: Federate an ArcGIS Server site with your portal.

For a fresh installation, the same issue can occur if a custom domain name server (DNS) is used. Portal for ArcGIS must recognize the specified page and if Portal for ArcGIS does not have a whitelisted entry for the specified server page (server.internaldomain.com), the 400 error is returned.

Scenario 2: Accessing Portal for ArcGIS homepage

The error may occur due to a misconfiguration of a single Web Adaptor used for both Portal for ArcGIS and ArcGIS Server. The misconfiguration causes the web adaptor to register using an internal Fully Qualified Domain Name (FQDN). The Portal for ArcGIS homepage directs the site to the ArcGIS Server manager page, and returns the error.

Solution or Workaround

To resolve the error, use the following procedure according to the scenario involved:

Scenario 1

  1. Open /arcgis/portaladmin/security/oauth/getAppInfo?appID=arcgisonline&f=html in a web browser and record the JSON information from the Get App Info tool.
User-added image
  1. Open /arcgis/portaladmin/security/oauth/updateAppInfo, and add the copied JSON information into the App Info section.
User-added image

Scenario 2

  1. Uninstall the web adaptor.
  2. Reinstall the web adaptors for both Portal for ArcGIS and ArcGIS Server. For more information about configuring multiple ArcGIS Web Adaptors, refer to Configure multiple ArcGIS Web Adaptors.
  3. Configure ArcGIS Web Adaptor for Portal for ArcGIS.
  4. Manually edit the web adaptor to update the web adaptor URL, and direct it to the Portal for ArcGIS homepage.
    1. Access the Portal Admin site.
    2. Click System > Web Adaptors. This displays the name of the web adaptor.
    3. Click the web adaptor name.
    4. In the browser, append /edit to the URL. This redirects to the Edit Web Adaptor page.
    5. Update the Web adaptor URL field to direct the page to the Portal for ArcGIS homepage.
This is an image of the Edit Web Adaptor page.

Article ID: 000015445

Software:
  • Portal for ArcGIS
  • ArcGIS Server

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options