question

DrakeJaredBradley-4068 avatar image
1 Vote"
DrakeJaredBradley-4068 asked Ciaran-3461 answered

SharedWithMe endpoint wrong size and lastModifiedDateTime

https://graph.microsoft.com/v1.0/me/drive/sharedWithMe?$top=5000 returns incorrect information including LastModifiedDateTime and Size:


114591-1.png


When getting the item with https://graph.microsoft.com/v1.0/drives/b!jWogh66yJkGn88Bx39SZEq8nWcMIu4xBtHRml83oI_eUjSojCZAtSpb-eAdT6rLP/items/01VHOGXYI7B5ELUDPMH5ALEPSMHCGPREZY it returns the correct information:

114567-2.png


microsoft-graph-files
image.png (75.0 KiB)
image.png (90.1 KiB)
1.png (68.8 KiB)
2.png (86.7 KiB)
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Are you requesting these two APIs at the same time?

0 Votes 0 ·

Yes, they were done at the same time. The second screenshot is the accurate information. The sharedWithMe endpoint is returning incorrect data based on size and last modified.

0 Votes 0 ·
CarlZhao-MSFT avatar image
0 Votes"
CarlZhao-MSFT answered CarlZhao-MSFT commented

Judging from the screenshots of your two requests, it is obvious that the file has been modified once in "2021-07-08T14:36:33Z". From the lastModifiedBy parameter in the second screenshot, should use the application permission without user participation, and the application modified the file on behalf of a principal. So the size and lastModifiedDateTime parameters in the second screenshot have been changed.


As for the different results you got using the /sharedWithMe endpoint, I think there should be no synchronization.

· 7
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I'm not sure I follow this. Those calls were done at the same time. Shouldn't they have the same size and lastModifiedDateTime's regardless of which user/application modified it. I guess I don't understand why sharedWithMe is outdated, while the specific item call shows the correct new size and lastModifiedDateTime.

0 Votes 0 ·
CarlZhao-MSFT avatar image CarlZhao-MSFT DrakeJaredBradley-4068 ·

Append ?allowexternal=true to the GET request.

0 Votes 0 ·

Thanks for the reply, but we are still getting the same outdated information. The following is the item specific call:
114549-3.png

vs the sharedWithMe call:
114488-4.png


0 Votes 0 ·
image.png (94.5 KiB)
3.png (91.0 KiB)
4.png (73.0 KiB)
image.png (66.5 KiB)
image.png (83.0 KiB)
Show more comments
Ciaran-3461 avatar image
1 Vote"
Ciaran-3461 answered

I have the same issue.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.