Error Fetching TeamsID with Graph

Patrick 20 Reputation points
2024-05-28T15:46:04.66+00:00

Hi everyone,

I'm currently trying to retrieve the TeamsID using Microsoft Graph API. However ,I keep encountering an error and I'm not sure how to resolve it. Here is the request I'm making and the error message I'm receiving:

GET https://graph.microsoft.com/v1.0/me/teams/{TEAMSID}

Error message :

{

    "error": {

        "code": "Request_ResourceNotFound",

        "message": "Resource 'teams' does not exist or one of its queried reference-property objects are not present.",

        "innerError": {

            "date": "2024-05-27T12:35:59",

            "request-id": "21ad602c-9b6a-4506-a0e2-9b65fe6427f9",

            "client-request-id": "03a92fc5-ea36-f8f5-29a2-08246388ee7b"

        }

    }

}

I've double-checked the permissions(Group.Read.All,Team.ReadBasic.All) granted in Graph Explorer. Despite this, the error persists.

Could someone please help me understand what might be causing this issue and how I can successfully retrieve the teams ID? Any insights or suggestions would be greatly appreciated.

Thanks in advance!

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,577 questions
0 comments No comments
{count} votes

Accepted answer
  1. Saranya Madhu-MSFT 685 Reputation points Microsoft Vendor
    2024-05-28T16:06:25.4166667+00:00

    Hi Patrick,

    Thanks for reaching out!

    I can understand that you are trying to get teamsID.

    1.You can use the endpoint:

    GET https://graph.microsoft.com/v1.0/teams

    From the response you can get the id from the response which refers to teamsID.User's image 2.GET https://graph.microsoft.com/v1.0/teams/{teamsID}User's image

    Hope this helps.

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

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Vasil Michev 110.3K Reputation points MVP
    2024-05-28T15:54:05+00:00

    There is no /me/Teams endpoint. If you are looking for a way to report on the teams for the user currently using the app, /me/JoinedTeams would do. Otherwise, use /teams instead (without /me).

    0 comments No comments

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.