I am federating ArcGIS Server with Portal for ArcGIS and I can't get any tokens from Portal nor publish services to Server anymore. Whenever I click on any existing map service, it's asking me to sign in but whenever I type in my credentials, I get the error "Unable to access authentication service". I did a network trace and I see it's doing this call to Portal to get a token: https://myportal.myorg.com/arcgis/sharing/rest/generateToken?request=getToken&username=admin&passwor...&expiration=60&referer=gis.myorg.com&f=json
but when I try this URL in a browser, I get error code 405 GWM_0005 Method not supported. In the Portal error logs, I see Token generated for user 'admin' when I tried the credentials. Also in Portal Security, I added gis.myorg.com to trusted servers and to CORS but that didn't have any effect. Is there some other setting that I am missing?
Also, all the existing services were published through ArcMap 5+ years ago. When I tried to publish a service through ArcGIS Pro, everything worked and I can publish and access the MapServer URL in Server Manager. So should I just republish everything through Pro if I want to federate with Portal?