Select to view content in your preferred language

"User not allowed for this account"

2223
1
09-30-2013 11:32 AM
BrianFlood
Regular Contributor
I sometimes get this error when trying to export a feature service via the REST api. The token is valid, I can make other calls with it and those work fine. The user for the token is the admin for the entire Org, so I don't know why a particular feature service could not be exported. finally, it works perfectly fine when logging in via the web UI and exporting with the context menu


example:
http://sdltesting3.maps.arcgis.com/sharing/rest/content/users/bFloodSDL3/export

POST payload:
{'itemId': u'c4e69696721d4cbb88ff3a8e8cbbc1ba', 'exportParameters': '{"layers":[{"id":"0"}]}', 'f': 'json', 'tags': 'Arc2Box,Backup', 'title': u'a2b_export_states_shp_1380567734', 'token': u'x6BoZD-8UBEgwkMnOrsUEwDhFoFd7QLfXvpVAHeZ82Tc470tB5J9eLly0ToyW0KGNcqJn7VkWm78ChIyfjeWSfHjfAAqIFnyepGqpRzDFyUGS9DMn8OWzLf2gpktzK790MoJBF7LwbdAkiQwZZzR48BQvoI4v3Po-c3DWRjrlqDq1k0L8OYpuAhLpJBPpCmN', 'exportFormat': 'Shapefile'}

response:
{"error":{"code":403,"messageCode":"DS_0003","message":"User not allowed for this account","details":[]}}
Tags (2)
0 Kudos
1 Reply
BrianFlood
Regular Contributor
thanks to the esri folks who helped out...

fwiw, the issue was using the portal name instead of the portal urlKey in the Url used to call the service. I had thought they were interchangeable but it appears the urlKey is the preferred method

in the REST api, use the Portal Self endpoint to get both values:
http://resources.arcgis.com/en/help/arcgis-rest-api/#/Portal_Self/02r3000001m7000000/

use "urlKey" instead of "name"

ex:
http://sdl3.maps.arcgis.com
vs
http://sdltesting3.maps.arcgis.com
0 Kudos