End this thread, the issue has been resolved.
Source: https://learn.microsoft.com/en-us/answers/questions/2115460/please-delete.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi Everyone,
I am trying to use Graph API to download the message attachment in teams channel.
But we found the channelData.team.id not in GUID format
"team": {
"id": "19:-Ml7DKbJkZVh9gO......cKEwmWw1@thread.tacv2"
}
that we cannot use https://graph.microsoft.com/v1.0/teams/{team-id}/channels/{channel-id}/messages/{chatMessage-id}
to get the message details.
here is the error message
{
"error": {
"code": "BadRequest",
"message": "teamId needs to be a valid GUID.",
"innerError": {
"date": "2024-11-05T02:08:41",
"request-id": "5073d0e3-55aa-4ec8-8405-45455232b4c4",
"client-request-id": "7100dd6c-673f-368c-df14-afec60b69f49"
}
}
}
Will anyone know how to get the GUID by the channelData.team.id?
Or how can we get the message details by the ID?
End this thread, the issue has been resolved.
Source: https://learn.microsoft.com/en-us/answers/questions/2115460/please-delete.
Hello David Chan,
Thank you for contacting Microsoft Support!
It looks like you're encountering an issue with the teams-id format when trying to use the Graph API to download message attachments in a Teams channel.
To resolve this, you can use the following steps:
GET /teams
endpoint to list all teams that the user is a member of. This will return the GUIDs for the teams. GET https://graph.microsoft.com/v1.0/me/joinedTeams
GET https://graph.microsoft.com/v1.0/teams/{team-id}/channels
GET /teams/{team-id}/channels/{channel-id}/messages/{chatMessage-id}
endpoint. GET https://graph.microsoft.com/v1.0/teams/{team-id}/channels/{channel-id}/messages/{chatMessage-id}
Hope this helps.
If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.
End this thread, the issue has been resolved.
Hi @David Chan,
This id looks like a chat id or a channel id, check if you have passed the channel id to the team id by mistake.
As the error message says, the team id should be in GUID format. If you don't have the team id stored, you can retrieve it by calling the /teams?$filter=displayName eq '{team name}'
API.
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.