Forum Discussion

Jagrati_Gupta's avatar
Jagrati_Gupta
Copper Contributor
Aug 02, 2023

Unable to identify folders and files using Microsoft graph API - seeking resolution

Hello Microsoft Teams community,

I'm encountering an issue with the Microsoft Teams Graph API (version 4.44) while working in a custom team. In the files section, while trying to add files, I am facing unexpected behaviour where the folder type is returning as not null, and the file type is returning as null for both folders and files. According to the API documentation, the expected behaviour should be the opposite: folder type should be null, and file type should be not null.

As per Microsoft documentation:
https://learn.microsoft.com/en-us/onedrive/developer/rest-api/resources/driveitem?view=odsp-graph-online

Has anyone else experienced this issue in their custom teams using Graph API v4.44? If so, how did you resolve it?

I've already tried the following troubleshooting steps:

1. Double-checked the API version to ensure I'm using v4.44.
2. Verified that the permissions for the API are set correctly.
3. Cleared cache and re-authenticated the API calls.

Despite these efforts, the problem persists. I suspect it might be a bug or a configuration issue. Any insights or suggestions on how to troubleshoot and resolve this issue would be greatly appreciated.

Thank you in advance for your help!

Resources