Skip to main content
Solved

Add metadata API endpoint with .NET SDK

  • January 26, 2026
  • 1 reply
  • 38 views

Forum|alt.badge.img

I’m trying to use this Nuget package (https://github.com/box/box-windows-sdk-v2/tree/main) to add metadata to files.

I followed all the steps in this guide (https://github.com/box/box-windows-sdk-v2/blob/main/docs/Authentication.md#jwt-auth) using the JWT auth method, to set up the platform app, and set up the authentication in the code. 

I’m using the endpoint described here (https://github.com/box/box-windows-sdk-v2/blob/main/docs/FileMetadata.md#create-metadata-instance-on-file), but when I’m running the code I’m getting an error saying that the file with the Id I’m giving does not exist. I know this is not true because I can get to the same file in the UI, and the Ids match exactly.

is there some special permission I need to give the app in order to access my files?

Best answer by yescommunities

I solved this. For anyone who has the same problem and finds this, your service account generated by the platform app must be added as a collaborator with editor permissions to be able to use any endpoint that edits files or folders. This can be configured in the Admin Console under “Users & Groups“. That, or set up the JWT Auth like this ( jwtAuth.WithUserSubject("USER_ID")) with the User Id of someone who is a collaborator with editor permissions.

1 reply

Forum|alt.badge.img
  • Author
  • New Participant
  • Answer
  • January 27, 2026

I solved this. For anyone who has the same problem and finds this, your service account generated by the platform app must be added as a collaborator with editor permissions to be able to use any endpoint that edits files or folders. This can be configured in the Admin Console under “Users & Groups“. That, or set up the JWT Auth like this ( jwtAuth.WithUserSubject("USER_ID")) with the User Id of someone who is a collaborator with editor permissions.