ArcGIS Server REST federate method

494
1
Jump to solution
10-20-2017 11:43 AM
SebastianCabrera
Esri Contributor

For some reason, ArcGIS Server federation with Portal was not working properly in a test environment, I solved it. Previously, when we published a service to ArcGIS Server, an item in Portal was not created. There are several services with no item in Portal. I understand that the  ArcGIS Server REST "Federate" method can create the missing corresponding items in Portal. Is this correct? 

I tried to run this operation, getting a token from portal, and using http post method, but I always get an invalid token error. 

{"status":"error","messages":["A valid token from Portal and its referer is required to perform this operation."],"code":500}

Is there an example of how to use this method?

Thank you

0 Kudos
1 Solution

Accepted Solutions
JonathanQuinn
Esri Frequent Contributor

It doesn't appear as though there's an answer to this, but the reason why it wasn't working is because you were likely signing into the Admin API using the PSA credentials.  The problem is that a Server token can't be used to create items within the Portal, and by using the PSA credentials, you've created a Server token.  If you were to create a Portal token by following the instructions below the PSA parameters, then that would allow you to use the Federate operation. 

View solution in original post

1 Reply
JonathanQuinn
Esri Frequent Contributor

It doesn't appear as though there's an answer to this, but the reason why it wasn't working is because you were likely signing into the Admin API using the PSA credentials.  The problem is that a Server token can't be used to create items within the Portal, and by using the PSA credentials, you've created a Server token.  If you were to create a Portal token by following the instructions below the PSA parameters, then that would allow you to use the Federate operation.