**Environment**
- ArcGIS Enterprise (Portal) version:11.X
- Single machine / HA: Single
- Web Adaptor: yes
I registered a custom OAuth2 application programmatically (ArcGIS API for Python `registerApp`). The redirect URIs are supplied from a config file, and that config does NOT contain the portal machine name or the public FQDN. Immediately after registration, the app's redirect_uris are exactly what I specified (no machine name, no FQDN).
Weeks later, without the registration script running again, two extra redirect URIs have appeared in the app:
- the portal's internal machine name (e.g. https://gisserver01.internal)
- the public FQDN (e.g. https://portal.example.com)
I remove them (as admin), and after some time they come back.
**What I've already checked / ruled out**
- The Python registration script has NOT run since the initial registration.
- The redirect URIs are 100% not in the script/config.
- Portal logs at DEBUG level show no updateAppInfo / registerApp / redirect-related entries around the time they reappear.
- The app's owner is a now-disabled account, so nothing can be authenticating and editing as the owner.
- This only happens to THIS one custom app. Other OAuth2 apps in the same portal do not get URIs re-added.
**My question**
What mechanism in Portal re-injects its own machine name / FQDN into a custom app's redirect_uris after the fact? Is this expected behavior tied to portal service restart, upgrade, reindex? Is there any way to prevent it, or is removing them post-restart the only option? And does the disabled owner account matter here?
If anyone from Esri can point to documentation or a KB article on why the FQDN/machine name is added to redirect URIs by default, that would be hugely helpful. I haven't been able to find anything official describing this.
Thanks!