Portal rest login - invalid redirect_uri

3584
11
10-12-2021 09:02 AM
Department_of_Communications__
New Contributor III
Hi ArcGIS Enterprise  / Portal users can anybody direct me on this please .. I've tried * everything I can think of .. but I have obviously missed something !! If I try to connect to https://MYPORTAL.com/portal/sharing/rest/ and login I get redirected to and invalid redirect_uri (see it in the url below https://MYPORTAL.com,%20MYINTERNALOADBALANCERNAME.com)
 
 
The correct redirect_uri is for this example https://MYPORTAL.com/portal/sharing/rest/login?  but somehow the loadbalamcer address is being added also. MY privatePortalURL and WebContxt are correct in Portal properties. My arcgisonline appid has all the correct addresses it needs, but obviously not the one that has the portal and the loadbalancer as the address as it has a , and space in it and this is not catered for , as well as it not being the correct address. So my question how can I control this redirect_uri - is there another config somewhere?? how is it produced? . I tried IIS URL rewrite but I couldn't rewrite it .... Any ideas please, this affects a Rasteranalytics operation on the portal as the oauth2 fails with invalid redirect_uri, amongst other things. Any help on this would be hugely helpful as I'm STUCK. MY Portal is fronted by a load balancer .. so I wonder if the loadbalalncer coudlbe causig this? Its a simpel apache loadbalancer spun up by our IT guys.    
 
Any help, direction etc.  hugely appreciated..... 
 
Paulg
Tags (2)
0 Kudos
11 Replies
Yann-EricBoyeau
Occasional Contributor

Hi,

@Department_of_Communications__ you could mark @MaxBöcke answer as correct answer as I think he gave the right Apache configuration file syntax to avoid stacked headers and coma separated values for redirect_uri.

 

Department_of_Communications__
New Contributor III

@MaxBöcke   @Yann-EricBoyeau 

Apologies ... an oversight the solution provided by Max was correct, slightly different for our environment but definitely the correct solution.  with the joy of a solution I forgot to say thanks,  so many thanks and happy posting

Paulg