Webdav request for SSO user

Hi,

I need to perform a PROPPATCH request to Webdav server to modify the properties of a file for one of my users. When the user is recognized by Nextcloud, I can successfully use basic authentication with his credentials. Something like :
curl -u recognized_user_id:recognized_user_password -X PROPPATCH url_nextcloud…

However, for files belonging to users authenticated via SSO, I’m unsure how to proceed.

Moreover I attempt to use admin credentials to do it, I receive a 404 error indicating that the file cannot be found. Could you please advise on how to handle this situation?

To expose you entirely the problem, i created a nextcloud app, the backend execute a callback when a file is uploaded. This callback unzips the file, finds an information inside and persists this information. To persist we do the PROPPATCH request. Again all is good when the user is known by nextcloud and has simple credentials, but not if it’s a user connected via SSO.

For App or API accesses I recommend to set-up an app password, which will be independent from the users personal password. Being a Nextcloud adminstrator doesn’t automatically mean that you can access all files on the server. You can only access files you’ve created or to which access has been granted. For files which are stored in the user context, you need to use the “Impersonate” function from the GUI.

Wouldn’t be the “Workflow External Script” app an option or using a group folder to process the file?

Thanks for your answer j-ed, the “Workflow External Script” app isn’t an option because whit it I can’t do what I want, I already investigate, actions are limited. I will reformulate my question, someone would have to give me some elements on how to identify yourself when you make a PROPPATCH request to the Webdav server when you are a user connected via SSO. This must be possible because PROPFIND requests are made to retrieve the files in the frontend by the browser.