How to differentiate a regular SharePoint site vs Teams SharePoint site through Graph API

Vish Pothaganti 66 Reputation points
2023-03-07T13:55:50.3766667+00:00

Site metadata returned through Graph using https://graph.microsoft.com/v1.0/sites/{Site-ID} for a regular SharePoint site

{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#sites/$entity",
    "createdDateTime": "2021-04-13T13:19:30.687Z",
    "description": "Documentation",
    "id": "relqu.sharepoint.com,680275c0-a5c9-4ea6-adec-f263b2f77f41,f9e5ee0f-8b0f-49d9-ac1d-d093b3b29198",
    "lastModifiedDateTime": "2023-02-27T16:30:52Z",
    "name": "Documentation",
    "webUrl": "https://relqu.sharepoint.com/sites/Documentation",
    "displayName": "Documentation",
    "root": {},
    "siteCollection": {
        "hostname": "relqu.sharepoint.com"
    }
}

Site metadata returned through Graph using https://graph.microsoft.com/v1.0/sites/{Site-ID} for a Teams SharePoint site

{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#sites/$entity",
    "createdDateTime": "2021-06-18T16:25:18.54Z",
    "description": "This team is where Tom will test a variety of different scenarios",
    "id": "relqu.sharepoint.com,b56617a8-3d8b-4e9d-a6ad-bb2206912b7c,385117a0-f3c8-402c-8898-a694bf6feef4",
    "lastModifiedDateTime": "2023-02-27T16:36:39Z",
    "name": "TomsTestTeam",
    "webUrl": "https://relqu.sharepoint.com/sites/TomsTestTeam",
    "displayName": "Toms Test Team",
    "root": {},
    "siteCollection": {
        "hostname": "relqu.sharepoint.com"
    }
}

Can any of the metadata here be used to differentiate between a regular SharePoint site vs Teams SharePoint site?

Can the Graph API query be updated to get any additional metadata to help with this differentiation?

Microsoft 365 and Office | SharePoint | For business | Windows
Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. RaytheonXie_MSFT 40,471 Reputation points Microsoft External Staff
    2023-03-08T05:55:10.6966667+00:00

    Hi @Vish Pothaganti,

    According to the API documentation, there seem no such endpoint that could expose the web template. You can refer to the document

    https://learn.microsoft.com/en-us/graph/api/resources/site?view=graph-rest-beta

    As aworkaround you can use site report to get site details with Root Web Template.

    https://learn.microsoft.com/en-us/graph/api/reportroot-getsharepointsiteusagedetail?view=graph-rest-1.0


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

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


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.