Share via

SharePointAPI about web_link

Ayase Morita 260 Reputation points
2025-02-04T00:51:58.1533333+00:00

In SharePointAPI, I want to determine if a file included in the “GET /drives/{drive-id}/items/{item-id}/children” API response I want to determine if the file included in the “GET /drives/{drive-id/items/{item-id/children” API response is a web_link.

Currently, the method to determine if a file is a web_link is based on whether the name property ends with “.url” or not.

Microsoft 365 and Office | SharePoint | Development
Microsoft Security | Microsoft Graph
0 comments No comments

Answer accepted by question author

Ling Zhou_MSFT 23,690 Reputation points Microsoft External Staff
2025-02-04T02:08:09.2966667+00:00

Hi @Ayase Morita,

Thanks for reaching out to us. We are very pleased to support you.

There are two ways to determine if a file is a web link:

  1. Check the name property: As you mentioned, if the name ends with ".url", it is likely a web link. User's image
  2. Inspect the file property: Look for a file object in the response. If the file object has a mimeType property with the value "application/octet-stream", it indicates that the item is a web link.

User's image

If you have any questions, please do not hesitate to contact me.

Moreover, if the issue can be fixed successfully, please click "Accept Answer" so that we can better archive the case and the other community members who are suffering the same issue can benefit from it.

Your kind contribution is much appreciated.

Was this answer helpful?

0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.