SharePoint WebDav server reporting wrong getlastmodified for files after folder name changed

%3CLINGO-SUB%20id%3D%22lingo-sub-2250897%22%20slang%3D%22en-US%22%3ESharePoint%20WebDav%20server%20reporting%20wrong%20getlastmodified%20for%20files%20after%20folder%20name%20changed%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2250897%22%20slang%3D%22en-US%22%3E%3CP%3EI'm%20new%20in%20SharePoint%20-%20please%20let%20me%20know%20if%20there%20is%20a%20better%20place%20to%20submit%20a%20bug%20report%20on%20SharePoint%20Server%20side%20WebDav%20beahviour.%20Involves%20XML%20and%20is%20purely%20(I%20think!)%20server%20side%20and%20I'm%20not%20sure%20where%20is%20the%20best%20place%20for%20this.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20use%20SharePoint%20to%20store%20files%20(in%20a%20SharePoint%20library)%20and%20we%20access%20them%20using%20Microsoft%20SharePointOnline%20(Web)%20and%20also%20using%20WebDav.%3C%2FP%3E%3CP%3EWe%20have%20a%20problem%20that%20affects%20our%20workflow%3A%20if%20we%20change%20the%20name%20of%20a%20folder%20using%20Microsoft%20SharePoint%20Web%20(and%20probably%20Microsoft%20Graph%20API)%3A%20the%20modification%20times%20reported%20by%20the%20WebDav%20API%20is%20updated%20to%20the%20time%20that%20the%20folder%20name%20changed!%3C%2FP%3E%3CP%3EFor%20example%3A%3C%2FP%3E%3CP%3E%3CBR%20%2F%3E%3CSTRONG%3EHTTP%20REQUEST%20(edited%20for%20Cookies%2C%20etc.)%3A%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPROPFIND%20%2Fsites%2Fl%2FS%2Ftest22%2F%20HTTP%2F1.1%3CBR%20%2F%3EHost%3A%20swisspolar.sharepoint.com%3CBR%20%2F%3EReferer%3A%20%3CA%20href%3D%22https%3A%2F%2Fswisspolar.sharepoint.com%2Fsites%2Fl%2FS%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fswisspolar.sharepoint.com%2Fsites%2Fl%2FS%2F%3C%2FA%3E%3CBR%20%2F%3EAccept-Encoding%3A%20gzip%3C%2FP%3E%3CP%3E%3CBR%20%2F%3E%3CSTRONG%3EHTTP%20RESPONSE%3A%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CMULTISTATUS%20d%3D%22%26quot%3BDAV%3A%26quot%3B%22%20office%3D%22%26quot%3Burn%3Aschemas-microsoft-com%3Aoffice%3Aoffice%26quot%3B%26lt%3BBR%22%3E%3C%2FMULTISTATUS%3Exmlns%3ARepl%3D%22%3CA%20href%3D%22http%3A%2F%2Fschemas.microsoft.com%2Frepl%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttp%3A%2F%2Fschemas.microsoft.com%2Frepl%2F%3C%2FA%3E%22%26gt%3B%3CBR%20%2F%3E%3CRESPONSE%3E%3CBR%20%2F%3E%3CHREF%3E%3CA%20href%3D%22https%3A%2F%2Fswisspolar.sharepoint.com%2Fsites%2Fl%2FS%2Ftest22%2F%26lt%3B%2FD%3Ahref%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fswisspolar.sharepoint.com%2Fsites%2Fl%2FS%2Ftest22%2F%3C%2FA%3E%3C%2FHREF%3E%26gt%3B%3CBR%20%2F%3E%3CPROPSTAT%3E%3CBR%20%2F%3E%3CPROP%3E%3CBR%20%2F%3E%3CDISPLAYNAME%3Etest22%3C%2FDISPLAYNAME%3E%3CBR%20%2F%3E%3CLOCKDISCOVERY%3E%3C%2FLOCKDISCOVERY%3E%3CBR%20%2F%3E%3CSUPPORTEDLOCK%3E%3C%2FSUPPORTEDLOCK%3E%3CBR%20%2F%3E%3CISFOLDER%3Et%3C%2FISFOLDER%3E%3CBR%20%2F%3E%3CISCOLLECTION%3E1%3C%2FISCOLLECTION%3E%3CBR%20%2F%3E%3CISHIDDEN%3E0%3C%2FISHIDDEN%3E%3CBR%20%2F%3E%3CGETCONTENTTYPE%3Eapplication%2Foctet-stream%3C%2FGETCONTENTTYPE%3E%3CBR%20%2F%3E%3CGETCONTENTLENGTH%3E0%3C%2FGETCONTENTLENGTH%3E%3CBR%20%2F%3E%3CRESOURCETYPE%3E%3CBR%20%2F%3E%3CCOLLECTION%3E%3C%2FCOLLECTION%3E%3CBR%20%2F%3E%3C%2FRESOURCETYPE%3E%3CBR%20%2F%3E%3CAUTHORITATIVE-DIRECTORY%3Et%3C%2FAUTHORITATIVE-DIRECTORY%3E%3CBR%20%2F%3E%3CSTRONG%3E%3CGETLASTMODIFIED%3EThu%2C%2001%20Apr%202021%2023%3A15%3A06%20GMT%3C%2FGETLASTMODIFIED%3E%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CCREATIONDATE%3E2021-03-30T19%3A00%3A24Z%3C%2FCREATIONDATE%3E%3CBR%20%2F%3E%3CREPL-UID%3Erid%3A%7B6F3AB737-05C6-47C0-BABA-08110E241BDA%7D%3C%2FREPL-UID%3E%3CBR%20%2F%3E%3CRESOURCETAG%3Ert%3A6F3AB737-05C6-47C0-BABA-08110E241BDA%4000000000005%3C%2FRESOURCETAG%3E%3CBR%20%2F%3E%3CGETETAG%3E%26amp%3Bquot%3B%7B6F3AB737-05C6-47C0-BABA-08110E241BDA%7D%2C5%26amp%3Bquot%3B%3C%2FGETETAG%3E%3CBR%20%2F%3E%3C%2FPROP%3E%3CBR%20%2F%3E%3CSTATUS%3EHTTP%2F1.1%20200%20OK%3C%2FSTATUS%3E%3CBR%20%2F%3E%3C%2FPROPSTAT%3E%3CBR%20%2F%3E%3C%2FRESPONSE%3E%3C%2FP%3E%3CP%3E%3CRESPONSE%3E%3CBR%20%2F%3E%3CHREF%3E%3CA%20href%3D%22https%3A%2F%2Fswisspolar.sharepoint.com%2Fsites%2Fl%2FS%2Ftest22%2Ftest.docx%26lt%3B%2FD%3Ahref%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fswisspolar.sharepoint.com%2Fsites%2Fl%2FS%2Ftest22%2Ftest.docx%3C%2FA%3E%3C%2FHREF%3E%26gt%3B%3CBR%20%2F%3E%3CPROPSTAT%3E%3CBR%20%2F%3E%3CPROP%3E%3CBR%20%2F%3E%3CSTRONG%3E%3CDISPLAYNAME%3Etest.docx%3C%2FDISPLAYNAME%3E%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CLOCKDISCOVERY%3E%3C%2FLOCKDISCOVERY%3E%3CBR%20%2F%3E%3CSUPPORTEDLOCK%3E%3CBR%20%2F%3E%3CLOCKENTRY%3E%3CBR%20%2F%3E%3CLOCKSCOPE%3E%3CBR%20%2F%3E%3CEXCLUSIVE%3E%3C%2FEXCLUSIVE%3E%3CBR%20%2F%3E%3C%2FLOCKSCOPE%3E%3CBR%20%2F%3E%3CLOCKTYPE%3E%3CBR%20%2F%3E%3CWRITE%3E%3C%2FWRITE%3E%3CBR%20%2F%3E%3C%2FLOCKTYPE%3E%3CBR%20%2F%3E%3C%2FLOCKENTRY%3E%3CBR%20%2F%3E%3C%2FSUPPORTEDLOCK%3E%3CBR%20%2F%3E%3CSTRONG%3E%3CGETLASTMODIFIED%3EThu%2C%2001%20Apr%202021%2023%3A15%3A06%20GMT%3C%2FGETLASTMODIFIED%3E%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CCREATIONDATE%3E2021-04-01T23%3A10%3A45Z%3C%2FCREATIONDATE%3E%3CBR%20%2F%3E%3CGETCONTENTLENGTH%3E17641%3C%2FGETCONTENTLENGTH%3E%3CBR%20%2F%3E%3CREPL-UID%3Erid%3A%7B85A1E1F5-770D-4F72-8E7D-4AC87C0E62E3%7D%3C%2FREPL-UID%3E%3CBR%20%2F%3E%3CRESOURCETAG%3Ert%3A85A1E1F5-770D-4F72-8E7D-4AC87C0E62E3%4000000000006%3C%2FRESOURCETAG%3E%3CBR%20%2F%3E%3CGETETAG%3E%26amp%3Bquot%3B%7B85A1E1F5-770D-4F72-8E7D-4AC87C0E62E3%7D%2C6%26amp%3Bquot%3B%3C%2FGETETAG%3E%3CBR%20%2F%3E%3CMODIFIEDBY%3Ei%3A0%23.f%7Cmembership%7Ccarles.pinaestany%40swisspolar.ch%3C%2FMODIFIEDBY%3E%3CBR%20%2F%3E%3C%2FPROP%3E%3CBR%20%2F%3E%3CSTATUS%3EHTTP%2F1.1%20200%20OK%3C%2FSTATUS%3E%3CBR%20%2F%3E%3C%2FPROPSTAT%3E%3CBR%20%2F%3E%3C%2FRESPONSE%3E%3CBR%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CP%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20I%20pay%20attention%20at%20%3CSTRONG%3ED%3Agetlastmodified%3C%2FSTRONG%3E%20of%20the%20returned%20elements%3A%3CBR%20%2F%3E-test22%20folder%3A%20Thu%2C%2001%20Apr%202021%2023%3A15%3A06%20GMT%3CBR%20%2F%3E-test22%2Ftest.docx%3A%20Thu%2C%2001%20Apr%202021%2023%3A15%3A06%20GMT%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EVia%20SharePoint%20Web%20I%20change%20the%20name%20of%20the%20folder%20from%20test22%20to%20test23%20and%20I%20do%20the%20same%20request%20(PROPFIND%20%2Ftest23)%20and%20I%20get%20these%20times%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E-test23%20folder%3A%20%3CGETLASTMODIFIED%3EFri%2C%2002%20Apr%202021%2013%3A40%3A13%20GMT%3C%2FGETLASTMODIFIED%3E%3CBR%20%2F%3E-test23%2Ftest.docx%3A%20%3CGETLASTMODIFIED%3EFri%2C%2002%20Apr%202021%2013%3A40%3A13%20GMT%3C%2FGETLASTMODIFIED%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20I%20check%20the%20last%20modified%20time%20of%20the%20file%20using%20SharePoint%20Web%20or%20Microsoft%20Graph%20API%3A%20the%20get%20last%20modified%20of%20the%20file%20is%20the%20previous%20one.%20WebDav%20getlastmodified%20for%20the%20files%20is%20broken%20on%20changing%20the%20name%20of%20the%20folder.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20are%20using%20certain%20software%20that%20connects%20to%20SharePoint%20via%20WebDav%20and%20this%20is%20causing%20problems.%3C%2FP%3E%3CP%3EI've%20checked%20other%20WebDav%20implementations%20(Apache)%20and%20renaming%20a%20folder%20or%20changing%20the%20modified%20time%20of%20a%20folder%20doesn't%20affect%20the%20modified%20time%20of%20the%20files.%20SharePoint%20Microsoft%20Graph%20API%20does%20not%20do%20this%20either%20so%20to%20me%20seems%20like%20a%20WebDav%20server%20side%20bug.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECan%20this%20be%20fixed%3F%20I'm%20happy%20to%20verify%20or%20provide%20more%20information%2C%20just%20let%20me%20know%20what%20you%20need%20if%20you%20cannot%20reproduce%20this%20problem%20or%20need%20further%20explanation.%20Feel%20free%20to%20contact%20me%20in%20personal%20message%20if%20needed%20as%20well.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20very%20much%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECarles%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2250897%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDocument%20Library%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOneDrive%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Server%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Visitor

I'm new in SharePoint - please let me know if there is a better place to submit a bug report on SharePoint Server side WebDav beahviour. Involves XML and is purely (I think!) server side and I'm not sure where is the best place for this.

 

We use SharePoint to store files (in a SharePoint library) and we access them using Microsoft SharePointOnline (Web) and also using WebDav.

We have a problem that affects our workflow: if we change the name of a folder using Microsoft SharePoint Web (and probably Microsoft Graph API): the modification times reported by the WebDav API is updated to the time that the folder name changed!

For example:


HTTP REQUEST (edited for Cookies, etc.):

 

PROPFIND /sites/l/S/test22/ HTTP/1.1
Host: swisspolar.sharepoint.com
Referer: https://swisspolar.sharepoint.com/sites/l/S/
Accept-Encoding: gzip


HTTP RESPONSE:


<?xml version="1.0" encoding="utf-8" ?>
<D:multistatus xmlns:D="DAV:" xmlns:Office="urn:schemas-microsoft-com:office:office"
xmlns:Repl="http://schemas.microsoft.com/repl/">
<D:response>
<D:href>https://swisspolar.sharepoint.com/sites/l/S/test22/</D:href>
<D:propstat>
<D:prop>
<D:displayname>test22</D:displayname>
<D:lockdiscovery/>
<D:supportedlock/>
<D:isFolder>t</D:isFolder>
<D:iscollection>1</D:iscollection>
<D:ishidden>0</D:ishidden>
<D:getcontenttype>application/octet-stream</D:getcontenttype>
<D:getcontentlength>0</D:getcontentlength>
<D:resourcetype>
<D:collection/>
</D:resourcetype>
<Repl:authoritative-directory>t</Repl:authoritative-directory>
<D:getlastmodified>Thu, 01 Apr 2021 23:15:06 GMT</D:getlastmodified>
<D:creationdate>2021-03-30T19:00:24Z</D:creationdate>
<Repl:repl-uid>rid:{6F3AB737-05C6-47C0-BABA-08110E241BDA}</Repl:repl-uid>
<Repl:resourcetag>rt:6F3AB737-05C6-47C0-BABA-08110E241BDA@00000000005</Repl:resourcetag>
<D:getetag>&quot;{6F3AB737-05C6-47C0-BABA-08110E241BDA},5&quot;</D:getetag>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>

<D:response>
<D:href>https://swisspolar.sharepoint.com/sites/l/S/test22/test.docx</D:href>
<D:propstat>
<D:prop>
<D:displayname>test.docx</D:displayname>
<D:lockdiscovery/>
<D:supportedlock>
<D:lockentry>
<D:lockscope>
<D:exclusive/>
</D:lockscope>
<D:locktype>
<D:write/>
</D:locktype>
</D:lockentry>
</D:supportedlock>
<D:getlastmodified>Thu, 01 Apr 2021 23:15:06 GMT</D:getlastmodified>
<D:creationdate>2021-04-01T23:10:45Z</D:creationdate>
<D:getcontentlength>17641</D:getcontentlength>
<Repl:repl-uid>rid:{85A1E1F5-770D-4F72-8E7D-4AC87C0E62E3}</Repl:repl-uid>
<Repl:resourcetag>rt:85A1E1F5-770D-4F72-8E7D-4AC87C0E62E3@00000000006</Repl:resourcetag>
<D:getetag>&quot;{85A1E1F5-770D-4F72-8E7D-4AC87C0E62E3},6&quot;</D:getetag>
<Office:modifiedby>i:0#.f|membership|carles.pinaestany@swisspolar.ch</Office:modifiedby>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
</D:multistatus>

 

If I pay attention at D:getlastmodified of the returned elements:
-test22 folder: Thu, 01 Apr 2021 23:15:06 GMT
-test22/test.docx: Thu, 01 Apr 2021 23:15:06 GMT

 

Via SharePoint Web I change the name of the folder from test22 to test23 and I do the same request (PROPFIND /test23) and I get these times:

 

-test23 folder: <D:getlastmodified>Fri, 02 Apr 2021 13:40:13 GMT</D:getlastmodified>
-test23/test.docx: <D:getlastmodified>Fri, 02 Apr 2021 13:40:13 GMT</D:getlastmodified>

 

If I check the last modified time of the file using SharePoint Web or Microsoft Graph API: the get last modified of the file is the previous one. WebDav getlastmodified for the files is broken on changing the name of the folder.

 

We are using certain software that connects to SharePoint via WebDav and this is causing problems.

I've checked other WebDav implementations (Apache) and renaming a folder or changing the modified time of a folder doesn't affect the modified time of the files. SharePoint Microsoft Graph API does not do this either so to me seems like a WebDav server side bug.

 

Can this be fixed? I'm happy to verify or provide more information, just let me know what you need if you cannot reproduce this problem or need further explanation. Feel free to contact me in personal message if needed as well.

 

Thank you very much,

 

Carles

 

0 Replies