WEBDav SEARCH request fails with "Principal with name xxx not found"

Hello

I am trying to use WEBDAV Search request righat as it desribed in manual.

For example this request

<d:searchrequest xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns">
     <d:basicsearch>
         <d:select>
             <d:prop>
                 <oc:fileid/>
                 <d:getcontenttype/>
                 <d:getetag/>
                 <oc:size/>
                 <d:getlastmodified/>
                 <d:resourcetype/>
             </d:prop>
         </d:select>
         <d:from>
             <d:scope>
                 <d:href>/files/xxx/</d:href>
                 <d:depth>infinity</d:depth>
             </d:scope>
         </d:from>
         <d:where>
             <d:not>
                 <d:is-collection/>
             </d:not>
         </d:where>
         <d:orderby>
            <d:order>
                <d:prop>
                    <d:getlastmodified/>
                </d:prop>
                <d:descending/>
             </d:order>
         </d:orderby>
         <d:limit>
           <d:nresults>5</d:nresults>
         </d:limit>
    </d:basicsearch>
</d:searchrequest>

But always get error 404

<?xml version="1.0" encoding="utf-8"?>
<d:error
	xmlns:d="DAV:"
	xmlns:s="http://sabredav.org/ns">
	<s:exception>Sabre\DAV\Exception\NotFound</s:exception>
	<s:message>Principal with name xxx not found</s:message>
</d:error>

The user xxx is me and I exist. I can add files and manual work with it.
I also tryed other users, including users with admin rights.

What can be the reason of this error? Maybe there exists any permissions or settings that block executing of SEARCH request?

Welcome to the community @Daugawpils :handshake:

I followed the example and it works for me on NC29 :man_shrugging:

I recieved this error when wrong user name was provided in a query document. as the system doesn’t find the user please double check your userID - might be this differs from your expectations which is often the case in SSO scenarios. occ command occ user:list lists all valid user ID on the system.

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.