Select to view content in your preferred language

pulldata from Portal gives unable to generate token ArcGIS auth error

439
2
10-08-2024 01:22 AM
CherieMalone
Occasional Contributor

We are trying to pulldata from a field in a feature layer to find the last value in the table and increase it by 1 to get a unique ID, however we are getting a token error when the survey is accessed by someone without permission to the feature layer. What is the best way to make this field available to the public without exposing the rest of the fields in the feature layer?

0 Kudos
2 Replies
abureaux
MVP Frequent Contributor

You need to make a View layer. Easiest way is:

  1. Go to Portal
  2. Content
  3. Locate the Feature Layer
  4. Open the FL
  5. Click "Create View Layer" and follow the guide. Only add the field you need
  6. Set sharing permissions for that View Layer to Public (or you know, whatever you need permissions to be).
  7. Then reference that layer in S123
0 Kudos
CherieMalone
Occasional Contributor

thank you! We are still getting this error when trying to submit

{"error":{"code":500,"message":"JSONObject[\"objectid\"] not found.","details":["JSONObject[\"objectid\"] not found."]}}.

The FL view we are submitting to has the following settings:

CherieMalone_0-1728527958761.png

Could this be the problem?

0 Kudos