Graph API $expand not working on a channels fileFolder

Adz 286 Reputation points

It says here that the $expand filer is supported for this endpoint

This is the error message I get back

The query specified in the URI is not valid. Query option 'Expand' is not allowed. To allow it, set the 'AllowedQueryOptions' property on EnableQueryAttribute or QueryValidationSettings.  

Url that I call in Graph explorer{team-id}/channels/{channel-id}?$expand=filesFolder

Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
9,005 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,462 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Srinivasa Rao Darna 6,686 Reputation points Microsoft Vendor

    Hi @Adz ,

    The documentation about query-parameters-expand suggests not all properties or resources support $expand.

    You can use direct end point to get filesFolder for a teams channel.

    GET /teams/{id}/channels/{id}/filesFolder  

    Refer channel-get-filesfolder for more information.

    Hope this helps.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have further questions about this answer, please click "Comment".