Skip to content

Latest commit

 

History

History
123 lines (93 loc) · 4.27 KB

File metadata and controls

123 lines (93 loc) · 4.27 KB
title chat: markChatUnreadForUser
description Mark a chat as unread for a user.
author sweta-thapliyal
ms.localizationpriority medium
ms.subservice teams
doc_type apiPageType
ms.date 04/05/2024

chat: markChatUnreadForUser

Namespace: microsoft.graph

[!INCLUDE beta-disclaimer]

Mark a chat as unread for a user.

[!INCLUDE national-cloud-support]

Permissions

Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.

[!INCLUDE permissions-table]

HTTP request

POST /chats/{chat-id}/markChatUnreadForUser

Request headers

Name Description
Authorization Bearer {token}. Required. Learn more about authentication and authorization.
Content-Type application/json. Required.

Request body

In the request body, supply a JSON representation of the parameters.

The following table shows the parameters that can be used with this action.

Parameter Type Description
lastMessageReadDateTime DateTimeOffset Timestamp that indicates the time after which all sent or received messages are to be marked as unread.
user teamworkUserIdentity User to unread the chat for.

Note: lastMessageReadDateTime is optional in the request. If not mentioned, the last message would be marked as unread.

Response

If successful, this action returns a 204 No Content response code.

Examples

Request

POST https://graph.microsoft.com/beta/chats/19:7d898072-792c-4006-bb10-5ca9f2590649_8ea0e38b-efb3-4757-924a-5f94061cf8c2@unq.gbl.spaces/markChatUnreadForUser
Content-Type: application/json
Content-length: 158

{
  "user": {
    "id" : "d864e79f-a516-4d0f-9fee-0eeb4d61fdc2",
    "tenantId": "2a690434-97d9-4eed-83a6-f5f13600199a"
  },
  "lastMessageReadDateTime": "2021-05-27T22:13:01.577Z"
}

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]

[!INCLUDE sample-code] [!INCLUDE sdk-documentation]


Response

HTTP/1.1 204 No Content