Conversations involving multiple participants, allowing collaboration and information sharing in Teams
Thank you for posting your question in the Microsoft Q&A forum.
I completely understand why you’d like to automate this process, especially to maintain consistent branding and visual identity across chats.
However, at this time, I wasn’t able to find any Microsoft‑supported or officially documented API that allows you to set or update a Teams group chat image programmatically. This includes Microsoft Graph REST APIs, PowerShell, and JavaScript. While Microsoft Graph does document photo APIs for contacts, users, Microsoft 365 groups, and teams, there is currently no equivalent support for Teams chat threads or group chats.
If your objective is to programmatically manage a “container’s” image, there are a couple of supported alternatives you may want to consider:
1/ Updating a Team’s photo (if a Team can be used instead of a group chat):
Microsoft provides PowerShell cmdlets such as Set-MgTeamPhotoContent, which allow you to update a Team’s photo with a maximum size of 4 MB.
Reference: Set-MgTeamPhotoContent.
2/ Updating a Microsoft 365 Group photo, which can also influence the connected Team experience where applicable:
Microsoft Graph’s Update profilePhoto API explicitly supports updating photos for groups, teams, users, and contacts, again with a 4 MB size limit, using either PATCH or PUT depending on the resource.
Reference: Update profilePhoto.
That said, for actual Teams group chat images, the currently supported approach is via the end‑user experience in the Teams desktop or web client. Microsoft documents this process in: Personalize your group chat image in Microsoft Teams.
Although Microsoft Graph does provide chat APIs for creating and managing chats, members, and messages, the documented capabilities focus on areas such as chat creation, renaming chats, and posting messages, rather than managing chat avatars. You can review the current scope of these APIs here: Leverage new Microsoft Teams chat APIs to enable new scenarios.
Therefore, if your scenario requires a fully programmatically managed icon, using a Team or a Microsoft 365 Group‑backed workspace may be a better fit, as those containers are supported through Microsoft Graph and PowerShell.
I hope this helps you move forward smoothly.
Thank you so much for your patience and understanding throughout this process. If you have any questions or need further support, please don’t hesitate to reach out at any time.
I look forward to continuing the conversation.
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.