Not able to see Document library content inside MS Teams tab created using Graph API

Sushrut Paranjape 0 Reputation points
2025-02-11T09:14:18.34+00:00

Hello,

I am trying to create a Teams tab for showing Document library content using Graph API. I referred the configuration mentioned in https://learn.microsoft.com/en-us/graph/teams-configuring-builtin-tabs to create the tab with configured document library.

POST https://graph.microsoft.com/v1.0/teams/{team-id}/channels/{channel-id}/tabs
{
    "displayName": "Document%20Library1",
    "*** Email address is removed for privacy ***": "https://graph.microsoft.com/v1.0/appCatalogs/teamsApps/com.microsoft.teamspace.tab.files.sharepoint",
    "configuration": {
        "entityId": "",
        "contentUrl": "https://microsoft.sharepoint.com/teams/WWWtest/Shared%20Documents",
        "removeUrl": null,
        "websiteUrl": null
    }
}

enter image description here

Though I get the 201 Created response, the tabs view is seen like below screenshot:

I expect to see the library content loaded in the tab when I open the tab. If I create the tab from Teams manually, I can see the document library content when I open the tab.

I tried keeping entityId as empty and with some unique string but both didn't work. Anything that I am missing?

enter image description here

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

Your answer

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