How to fetch icon for specific OneDrive resource (file/folder) to use at desktop OneDrive client app

Copper Contributor

Hello,
I am developing a OneDrive client application, which allows to connect to OneDrive storage and get a list of folders and files. To present information to user in same view as OneDrive (web interface) provider needs to load specific resource icons. Microsoft Graph API doesn't provide direct links to icon asset.
How I able to receive link to icon that OneDrive used for the specific file / folder (not thumbnail, but associated icon for file, folder)?

Thanks

2 Replies

@KonstantinP That will not work. Thinking of more than 1 device:
Device 1 I have installed Office, so the file Assigned to a document will be the word icon
Device 2 I have installed Libre office, so the file Assigned to a document will be the libre office document icon.

So the assignment is in windows

Thanks for reply. I see your point. But I meant the icon which used in web interface of OneDrive storage (access through browser), without reference to installed programm. Google Drive API, for example provides such info and besides different sizes.