import Global from '../../_global.mdx';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# viva engage message get

Returns a Viva Engage message

## Usage

```sh
m365 viva engage message get [options]
```

## Options

```md definition-list
`--id <id>`
: The id of the Viva Engage message.
```

<Global />

## Remarks

:::warning

In order to use this command, you need to grant the Microsoft Entra application used by the CLI for Microsoft 365 the permission to the Viva Engage API. To do this, execute the `cli consent --service VivaEngage` command.

:::

## Examples

Returns the Viva Engage message with the id 1239871123.

```sh
m365 viva engage message get --id 1239871123
```

Returns the Viva Engage message with the id 1239871123 in JSON format.

```sh
m365 viva engage message get --id 1239871123 --output json
```

## Response

<Tabs>
  <TabItem value="JSON">

  ```json
  {
    "id": 2000337749565441,
    "sender_id": 36425097217,
    "delegate_id": null,
    "replied_to_id": null,
    "created_at": "2022/11/11 21:00:20 +0000",
    "network_id": 5897756673,
    "message_type": "update",
    "sender_type": "user",
    "url": "https://www.yammer.com/api/v1/messages/2000337749565441",
    "web_url": "https://www.yammer.com/contoso.onmicrosoft.com/messages/2000337749565441",
    "group_id": 31158067201,
    "body": {
      "parsed": "Hello everyone!",
      "plain": "Hello everyone!",
      "rich": "Hello everyone!"
    },
    "thread_id": 2000337749565441,
    "client_type": "O365 Api Auth",
    "client_url": "https://api.yammer.com",
    "system_message": false,
    "direct_message": false,
    "chat_client_sequence": null,
    "language": "no",
    "notified_user_ids": [],
    "privacy": "public",
    "attachments": [],
    "liked_by": {
      "count": 0,
      "names": []
    },
    "supplemental_reply": false,
    "content_excerpt": "Hello everyone!"
  }
  ```

  </TabItem>
  <TabItem value="Text">

  ```text
  attachments         : []
  body                : {"parsed":"Hello everyone!","plain":"Hello everyone!","rich":"Hello everyone!"}
  chat_client_sequence: null
  client_type         : O365 Api Auth
  client_url          : https://api.yammer.com
  content_excerpt     : Hello everyone!
  created_at          : 2022/11/11 21:00:20 +0000
  delegate_id         : null
  direct_message      : false
  group_id            : 31158067201
  id                  : 2000337749565441
  language            : no
  liked_by            : {"count":0,"names":[]}
  message_type        : update
  network_id          : 5897756673
  notified_user_ids   : []
  privacy             : public
  replied_to_id       : null
  sender_id           : 36425097217
  sender_type         : user
  supplemental_reply  : false
  system_message      : false
  thread_id           : 2000337749565441
  url                 : https://www.yammer.com/api/v1/messages/2000337749565441
  web_url             : https://www.yammer.com/contoso.onmicrosoft.com/messages/2000337749565441
  ```

  </TabItem>
  <TabItem value="CSV">

  ```csv
  id,sender_id,replied_to_id,thread_id,group_id,created_at,direct_message,system_message,privacy,message_type,content_excerpt
  2000337749565441,36425097217,,2000337749565441,31158067201,2022/11/11 21:00:20 +0000,,,public,update,Hello everyone!
  ```

  </TabItem>
  <TabItem value="Markdown">

  ```md
  # viva engage message get --id "2269815632207872"

  Date: 2023-05-16

  ## 2269815632207872

  Property | Value
  ---------|-------
  id | 2269815632207872
  sender\_id | 1842170699776
  created\_at | 2023/05/16 18:42:34 +0000
  published\_at | 2023/05/16 18:42:34 +0000
  network\_id | 98327945216
  message\_type | update
  sender\_type | user
  url | https://www.yammer.com/api/v1/messages/2269815632207872
  web\_url | https://www.yammer.com/contoso.onmicrosoft.com/messages/2269815632207872
  group\_id | 123412865024
  thread\_id | 2269815632207872
  client\_type | O365 Api Auth
  client\_url | https://api.yammer.com
  system\_message | false
  direct\_message | false
  language | no
  privacy | public
  supplemental\_reply | false
  content\_excerpt | Hello everyone!
  ```

  </TabItem>
</Tabs>

