ESC
Type to search...

Chat.ReadWrite

Export JSON
Export CSV
Copy URL
Print
Delegated Read/Write User Scope

Allows an app to read and write 1 on 1 or group chats threads, on behalf of the signed-in user.

Permission data: April 6, 2026 at 4:06 AM UTC
Delegated Access App-Only Access

Permission Details

Delegated Permission User consent allowed

Read and write user chat messages

Allows an app to read and write 1 on 1 or group chats threads, on behalf of the signed-in user.

Properties

Microsoft Graph v1.0 exact-category-docs

Properties is shown from stable Microsoft Graph v1.0 metadata.

Property Type Description
chatType chatType Specifies the type of chat. The possible values are: group, oneOnOne, meeting, unknownFutureValue.
createdDateTime dateTimeOffsetNullable Date and time at which the chat was created. Read-only.
id String The chat's unique identifier. Read-only.
isHiddenForAllMembers BooleanNullable Indicates whether the chat is hidden for all its members. Read-only.
lastUpdatedDateTime dateTimeOffsetNullable Date and time at which the chat was renamed or the list of members was last changed. Read-only.
onlineMeetingInfo teamworkOnlineMeetingInfo Represents details about an online meeting. If the chat isn't associated with an online meeting, the property is empty. Read-only.
tenantId StringNullable The identifier of the tenant in which the chat was created. Read-only.
topic StringNullable (Optional) Subject or topic for the chat. Only available for group chats.
viewpoint chatViewpoint Represents caller-specific information about the chat, such as the last message read date and time. This property is populated only when the request is made in a delegated context.
webUrl StringNullable The URL for the chat in Microsoft Teams. The URL should be treated as an opaque blob, and not parsed. Read-only.
installedApps teamsAppInstallation collection A collection of all the apps in the chat. Nullable.
lastMessagePreview object Preview of the last message sent in the chat. Null if no messages were sent in the chat. Currently, only the list chats operation supports this property.
members conversationMember collection A collection of all the members in the chat. Nullable.
messages chatMessage collection A collection of all the messages in the chat. Nullable.
permissionGrants resourceSpecificPermissionGrant collection A collection of permissions granted to apps for the chat.

Showing 15 of 17 properties.

JSON Representation

Microsoft Graph v1.0 exact-category-docs

JSON representation is shown from stable Microsoft Graph v1.0 metadata.

JSON representation
{
  "createdDateTime": "dateTimeOffset",
  "chatType": "string",
  "id": "string (identifier)",  
  "isHiddenForAllMembers": "Boolean",
  "lastUpdatedDateTime": "dateTimeOffset",
  "onlineMeetingInfo": {
    "@odata.type": "microsoft.graph.teamworkOnlineMeetingInfo"
  },
  "tenantId": "string",
  "topic": "string",
  
  "viewpoint": {
    "@odata.type": "microsoft.graph.chatViewpoint"
  },
  "webUrl": "string",
}

Relationships

Microsoft Graph v1.0 exact-category-docs

Relationships is shown from stable Microsoft Graph v1.0 metadata.

Relationship Type Description
installedApps teamsAppInstallation collection A collection of all the apps in the chat. Nullable.
lastMessagePreview chatMessageInfo Preview of the last message sent in the chat. Null if no messages were sent in the chat. Currently, only the list chats operation supports this property.
members conversationMember collection A collection of all the members in the chat. Nullable.
messages chatMessage collection A collection of all the messages in the chat. Nullable.
permissionGrants resourceSpecificPermissionGrant collection A collection of permissions granted to apps for the chat.
pinnedMessages pinnedChatMessageInfo collection A collection of all the pinned messages in the chat. Nullable.
tabs teamsTab collection A collection of all the tabs in the chat. Nullable.
chatType chatType Related chatType data exposed by this resource.
operations teamsAsyncOperation collection A collection of all the Teams async operations that ran or are running on the chat. Nullable.

Graph Methods

Delegated access App-only access
Exact Microsoft Learn match

Microsoft Graph v1.0 endpoints are mapped directly from refreshed Microsoft Learn permissions tables.

Methods
GET /chats
GET /chats/{chat-id}
GET /chats/{chat-id}/members
GET /chats/{chat-id}/members/{membership-id}
GET /chats/{chat-id}/messages
GET /chats/{chat-id}/messages/{message-id}
GET /chats/{chat-id}/messages/{message-id}/hostedContents
GET /chats/{chat-id}/messages/{message-id}/hostedContents/{hosted-content-id}
GET /chats/{chat-id}/pinnedMessages
GET /chats/{id}/members
GET /chats/{id}/members/{id}
GET /me/chats
GET /me/chats/{chat-id}
GET /me/chats/{chat-id}/messages
GET /me/chats/{chat-id}/messages/{message-id}
GET /teams/{id}/channels/{id}/members/{id}
GET /teams/{team-id}/channels/{channel-id}/messages/{message-id}
GET /teams/{team-id}/channels/{channel-id}/messages/{message-id}/hostedContents
GET /teams/{team-id}/channels/{channel-id}/messages/{message-id}/hostedContents/{hosted-content-id}
GET /teams/{team-id}/channels/{channel-id}/messages/{message-id}/replies/{reply-id}
GET /teams/{team-id}/channels/{channel-id}/messages/{message-id}/replies/{reply-id}/hostedContents
GET /teams/{team-id}/channels/{channel-id}/messages/{message-id}/replies/{reply-id}/hostedContents/{hosted-content-id}
GET /users/{user-id | user-principal-name}/chats
GET /users/{user-id | user-principal-name}/chats/{chat-id}
GET /users/{user-id | user-principal-name}/chats/{chat-id}/members
GET /users/{user-id | user-principal-name}/chats/{chat-id}/members/{membership-id}
GET /users/{user-id | user-principal-name}/chats/{chat-id}/messages
GET /users/{user-id | user-principal-name}/chats/{chat-id}/messages/{message-id}
GET /users/{user-id | user-principal-name}/chats/{chat-id}/messages/{message-id}/hostedContents
GET /users/{user-id | user-principal-name}/chats/{chat-id}/messages/{message-id}/hostedContents/{hosted-content-id}
POST /chats
POST /chats/{chat-id}/markChatReadForUser
POST /chats/{chat-id}/markChatUnreadForUser
POST /chats/{chat-id}/members
POST /chats/{chat-id}/messages
POST /chats/{chat-Id}/pinnedMessages
POST /chats/{chatId}/messages/{chatMessageId}/unsetReaction
POST /chats/{chatsId}/hideForUser
POST /chats/{chatsId}/messages/{chatMessageId}/setReaction
POST /chats/{chatsId}/unhideForUser
POST /teams/{teamId}/channels/{channelId}/messages/{messageId}/replies/{replyId}/setReaction
POST /teams/{teamId}/channels/{channelId}/messages/{messageId}/replies/{replyId}/softDelete
POST /teams/{teamId}/channels/{channelId}/messages/{messageId}/replies/{replyId}/undoSoftDelete
POST /teams/{teamId}/channels/{channelId}/messages/{messageId}/replies/{replyId}/unsetReaction
POST /teams/{teamsId}/channels/{channelId}/messages/{chatMessageId}/setReaction
POST /teams/{teamsId}/channels/{channelId}/messages/{chatMessageId}/softDelete
POST /teams/{teamsId}/channels/{channelId}/messages/{chatMessageId}/undoSoftDelete
POST /teams/{teamsId}/channels/{channelId}/messages/{chatMessageId}/unsetReaction
POST /users/{userId}/chats/{chatsId}/messages/{chatMessageId}/softDelete
POST /users/{userId}/chats/{chatsId}/messages/{chatMessageId}/undoSoftDelete
PATCH /chats/{chat-id}
PATCH /chats/{chatThread-id}/messages/{message-id}
PATCH /teams/(team-id)/channels/{channel-id}/messages/{message-id}
PATCH /teams/(team-id)/channels/{channel-id}/messages/{message-id}/replies/{reply-id}
DELETE /chats/{chat-id}/pinnedMessages/{pinnedChatMessageId}
Exact Microsoft Learn match

Microsoft Graph beta endpoints are mapped directly from refreshed Microsoft Learn permissions tables.

Methods
GET /chats
GET /chats/{chat-id}
GET /chats/{chat-id}/members
GET /chats/{chat-id}/members/{membership-id}
GET /chats/{chat-id}/messages
GET /chats/{chat-id}/messages/{message-id}
GET /chats/{chat-id}/messages/{message-id}/hostedContents
GET /chats/{chat-id}/messages/{message-id}/hostedContents/{hosted-content-id}
GET /chats/{chat-id}/operations
GET /chats/{chat-id}/operations/{operation-id}
GET /chats/{chat-id}/pinnedMessages
GET /me/chats
GET /me/chats/{chat-id}
GET /me/chats/{chat-id}/messages
GET /me/chats/{chat-id}/messages/{message-id}
GET /teams/{team-id}/channels/{channel-id}/messages/{message-id}
GET /teams/{team-id}/channels/{channel-id}/messages/{message-id}/hostedContents
GET /teams/{team-id}/channels/{channel-id}/messages/{message-id}/hostedContents/{hosted-content-id}
GET /teams/{team-id}/channels/{channel-id}/messages/{message-id}/replies/{reply-id}
GET /teams/{team-id}/channels/{channel-id}/messages/{message-id}/replies/{reply-id}/hostedContents
GET /teams/{team-id}/channels/{channel-id}/messages/{message-id}/replies/{reply-id}/hostedContents/{hosted-content-id}
GET /users/{user-id | user-principal-name}/chats
GET /users/{user-id | user-principal-name}/chats/{chat-id}
GET /users/{user-id | user-principal-name}/chats/{chat-id}/members
GET /users/{user-id | user-principal-name}/chats/{chat-id}/members/{membership-id}
GET /users/{user-id | user-principal-name}/chats/{chat-id}/messages
GET /users/{user-id | user-principal-name}/chats/{chat-id}/messages/{message-id}
GET /users/{user-id | user-principal-name}/chats/{chat-id}/messages/{message-id}/hostedContents
GET /users/{user-id | user-principal-name}/chats/{chat-id}/messages/{message-id}/hostedContents/{hosted-content-id}
POST /chats
POST /chats/{chat-id}/markChatReadForUser
POST /chats/{chat-id}/markChatUnreadForUser
POST /chats/{chat-id}/members
POST /chats/{chat-id}/messages
POST /chats/{chat-Id}/pinnedMessages
POST /chats/{chatId}/messages/{chatMessageId}/setReaction
POST /chats/{chatId}/messages/{chatMessageId}/unsetReaction
POST /chats/{chatsId}/hideForUser
POST /chats/{chatsId}/unhideForUser
POST /teams/{teamId}/channels/{channelId}/messages/{messageId}/replies/{replyId}/setReaction
POST /teams/{teamId}/channels/{channelId}/messages/{messageId}/replies/{replyId}/softDelete
POST /teams/{teamId}/channels/{channelId}/messages/{messageId}/replies/{replyId}/undoSoftDelete
POST /teams/{teamId}/channels/{channelId}/messages/{messageId}/replies/{replyId}/unsetReaction
POST /teams/{teamsId}/channels/{channelId}/messages/{chatMessageId}/setReaction
POST /teams/{teamsId}/channels/{channelId}/messages/{chatMessageId}/softDelete
POST /teams/{teamsId}/channels/{channelId}/messages/{chatMessageId}/undoSoftDelete
POST /teams/{teamsId}/channels/{channelId}/messages/{chatMessageId}/unsetReaction
POST /users/{userId}/chats/{chatsId}/messages/{chatMessageId}/softDelete
POST /users/{userId}/chats/{chatsId}/messages/{chatMessageId}/undoSoftDelete
PATCH /chats/{chat-id}
PATCH /chats/{chatThread-id}/messages/{message-id}
PATCH /teams/(team-id)/channels/{channel-id}/messages/{message-id}
PATCH /teams/(team-id)/channels/{channel-id}/messages/{message-id}/replies/{reply-id}
DELETE /chats/{chat-id}/pinnedMessages/{pinnedChatMessageId}
Exact Microsoft Learn PowerShell match

Microsoft Graph PowerShell v1.0 commands are mapped directly from refreshed Microsoft Learn PowerShell snippets.

Commands
Get-MgChat /chats
List chats
Get-MgChat /me/chats/{chat-id}
Get chat
Get-MgChatMember /chats/{chat-id}/members/{membership-id}
Get conversationMember in a chat
Get-MgChatMember /chats/{id}/members
List conversationMembers
Get-MgChatMember /chats/{id}/members/{id}
Get conversationMember
Get-MgChatMessage /me/chats/{chat-id}/messages
List messages in a chat
Get-MgChatMessage /teams/{team-id}/channels/{channel-id}/messages/{message-id}
Get chatMessage in a channel or chat
Get-MgChatMessageHostedContent /teams/{team-id}/channels/{channel-id}/messages/{message-id}/hostedContents
List hostedContents
Get-MgChatMessageHostedContent /teams/{team-id}/channels/{channel-id}/messages/{message-id}/hostedContents/{hosted-content-id}
Get chatMessageHostedContent
Get-MgChatPinnedMessage /chats/{chat-id}/pinnedMessages
List pinnedChatMessages in a chat
Get-MgTeamChannelMessage /teams/{team-id}/channels/{channel-id}/messages/{message-id}
Get chatMessage in a channel or chat
Get-MgTeamChannelMessageHostedContent /teams/{team-id}/channels/{channel-id}/messages/{message-id}/hostedContents
List hostedContents
Get-MgTeamChannelMessageReply /teams/{team-id}/channels/{channel-id}/messages/{message-id}
Get chatMessage in a channel or chat
Get-MgTeamChannelMessageReplyHostedContent /teams/{team-id}/channels/{channel-id}/messages/{message-id}/hostedContents
List hostedContents
Get-MgUserChat /chats
List chats
Get-MgUserChat /me/chats/{chat-id}
Get chat
Get-MgUserChatMember /chats/{chat-id}/members
List members of a chat
Invoke-MgGraphChat /chats/{chatsId}/unhideForUser
chat: unhideForUser
Invoke-MgMarkChatReadForUser /chats/{chat-id}/markChatReadForUser
chat: markChatReadForUser
Invoke-MgMarkChatUnreadForUser /chats/{chat-id}/markChatUnreadForUser
chat: markChatUnreadForUser
Invoke-MgSoftTeamChannelMessageDelete /teams/{teamsId}/channels/{channelId}/messages/{chatMessageId}/softDelete
chatMessage: softDelete
Invoke-MgSoftTeamChannelMessageReplyDelete /teams/{teamsId}/channels/{channelId}/messages/{chatMessageId}/softDelete
chatMessage: softDelete
Invoke-MgSoftUserChatMessageDelete /teams/{teamsId}/channels/{channelId}/messages/{chatMessageId}/softDelete
chatMessage: softDelete
New-MgChat /chats
Create chat
New-MgChatMember /chats/{chat-id}/members
Add member to a chat
New-MgChatMessage /chats/{chat-id}/messages
Send message in a chat
New-MgChatPinnedMessage /chats/{chat-Id}/pinnedMessages
Pin a message in a chat
Remove-MgChatPinnedMessage /chats/{chat-id}/pinnedMessages/{pinnedChatMessageId}
Unpin a message from a chat
Update-MgChat /chats/{chat-id}
Update chat
Update-MgTeamChannelMessage /teams/(team-id)/channels/{channel-id}/messages/{message-id}
Update chatMessage
Exact Microsoft Learn PowerShell match

Microsoft Graph PowerShell beta commands are mapped directly from refreshed Microsoft Learn PowerShell snippets.

Commands
Get-MgBetaChat /chats
List chats
Get-MgBetaChat /me/chats/{chat-id}
Get chat
Get-MgBetaChatMember /chats/{chat-id}/members/{membership-id}
Get conversationMember in a chat
Get-MgBetaChatMessage /me/chats/{chat-id}/messages
List messages in a chat
Get-MgBetaChatMessage /teams/{team-id}/channels/{channel-id}/messages/{message-id}
Get chatMessage in a channel or chat
Get-MgBetaChatMessageHostedContent /teams/{team-id}/channels/{channel-id}/messages/{message-id}/hostedContents
List hostedContents
Get-MgBetaChatMessageHostedContent /teams/{team-id}/channels/{channel-id}/messages/{message-id}/hostedContents/{hosted-content-id}
Get chatMessageHostedContent
Get-MgBetaChatOperation /chats/{chat-id}/operations
List operations on a chat
Get-MgBetaChatOperation /chats/{chat-id}/operations/{operation-id}
Get teamsAsyncOperation
Get-MgBetaChatPinnedMessage /chats/{chat-id}/pinnedMessages
List pinnedChatMessages in a chat
Get-MgBetaTeamChannelMessage /teams/{team-id}/channels/{channel-id}/messages/{message-id}
Get chatMessage in a channel or chat
Get-MgBetaTeamChannelMessageHostedContent /teams/{team-id}/channels/{channel-id}/messages/{message-id}/hostedContents
List hostedContents
Get-MgBetaTeamChannelMessageReply /teams/{team-id}/channels/{channel-id}/messages/{message-id}
Get chatMessage in a channel or chat
Get-MgBetaTeamChannelMessageReplyHostedContent /teams/{team-id}/channels/{channel-id}/messages/{message-id}/hostedContents
List hostedContents
Get-MgBetaUserChat /chats
List chats
Get-MgBetaUserChat /me/chats/{chat-id}
Get chat
Get-MgBetaUserChatMember /chats/{chat-id}/members
List members of a chat
Invoke-MgBetaGraphChat /chats/{chatsId}/unhideForUser
chat: unhideForUser
Invoke-MgBetaMarkChatReadForUser /chats/{chat-id}/markChatReadForUser
chat: markChatReadForUser
Invoke-MgBetaMarkChatUnreadForUser /chats/{chat-id}/markChatUnreadForUser
chat: markChatUnreadForUser
Invoke-MgBetaSoftTeamChannelMessageDelete /teams/{teamsId}/channels/{channelId}/messages/{chatMessageId}/softDelete
chatMessage: softDelete
Invoke-MgBetaSoftTeamChannelMessageReplyDelete /teams/{teamsId}/channels/{channelId}/messages/{chatMessageId}/softDelete
chatMessage: softDelete
Invoke-MgBetaSoftUserChatMessageDelete /teams/{teamsId}/channels/{channelId}/messages/{chatMessageId}/softDelete
chatMessage: softDelete
New-MgBetaChat /chats
Create chat
New-MgBetaChatMember /chats/{chat-id}/members
Add member to a chat
New-MgBetaChatMessage /chats/{chat-id}/messages
Send message in a chat
New-MgBetaChatPinnedMessage /chats/{chat-Id}/pinnedMessages
Pin a message in a chat
Remove-MgBetaChatPinnedMessage /chats/{chat-id}/pinnedMessages/{pinnedChatMessageId}
Unpin a message from a chat
Update-MgBetaChat /chats/{chat-id}
Update chat
Update-MgBetaTeamChannelMessage /teams/(team-id)/channels/{channel-id}/messages/{message-id}
Update chatMessage

Code Examples

C# / .NET SDK
chat: hideForUser
// Code snippets are only available for the latest version. Current version is 5.x

// Dependencies
using Microsoft.Graph.Chats.Item.HideForUser;
using Microsoft.Graph.Models;

var requestBody = new HideForUserPostRequestBody
{
	User = new TeamworkUserIdentity
	{
		Id = "d864e79f-a516-4d0f-9fee-0eeb4d61fdc2",
		AdditionalData = new Dictionary<string, object>
		{
			{
				"tenantId" , "2a690434-97d9-4eed-83a6-f5f13600199a"
			},
		},
	},
};

// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
await graphClient.Chats["{chat-id}"].HideForUser.PostAsync(requestBody);
JavaScript
chat: hideForUser
const options = {
	authProvider,
};

const client = Client.init(options);

const hideForUser = {
  user: {
    id: 'd864e79f-a516-4d0f-9fee-0eeb4d61fdc2',
    tenantId: '2a690434-97d9-4eed-83a6-f5f13600199a'
  }
};

await client.api('/chats/19:7d898072-792c-4006-bb10-5ca9f2590649_8ea0e38b-efb3-4757-924a-5f94061cf8c2@unq.gbl.spaces/hideForUser')
	.post(hideForUser);
PowerShell
chat: hideForUser
Import-Module Microsoft.Graph.Teams

$params = @{
	user = @{
		id = "d864e79f-a516-4d0f-9fee-0eeb4d61fdc2"
		tenantId = "2a690434-97d9-4eed-83a6-f5f13600199a"
	}
}

Hide-MgChatForUser -ChatId $chatId -BodyParameter $params
Python
chat: hideForUser
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.chats.item.hide_for_user.hide_for_user_post_request_body import HideForUserPostRequestBody
from msgraph.generated.models.teamwork_user_identity import TeamworkUserIdentity
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = HideForUserPostRequestBody(
	user = TeamworkUserIdentity(
		id = "d864e79f-a516-4d0f-9fee-0eeb4d61fdc2",
		additional_data = {
				"tenant_id" : "2a690434-97d9-4eed-83a6-f5f13600199a",
		}
	),
)

await graph_client.chats.by_chat_id('chat-id').hide_for_user.post(request_body)

App Registration

1

Navigate to Azure Portal

Go to App registrations in Microsoft Entra admin center

2

Add API Permission

Select your app → API permissions → Add a permission → Microsoft Graph

3

Select Permission Type

Choose Delegated permissions and search for Chat.ReadWrite

4

Grant Admin Consent

Users can consent to this permission during sign-in.