One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.
Permission type
Permissions (from least to most privileged)
Delegated (work or school account)
ServiceMessageViewpoint.Write
Delegated (personal Microsoft account)
Not supported.
Application
Not supported
HTTP request
POST /admin/serviceAnnouncement/messages/archive
Request headers
Name
Description
Authorization
Bearer {token}. Required.
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
messageIds
String collection
List of message IDs to archive.
Response
If successful, this action returns a 200 OK response code and a Boolean value true in the response body. Otherwise, will return false in the response body.
<?php
// THIS SNIPPET IS A PREVIEW FOR THE KIOTA BASED SDK. NON-PRODUCTION USE ONLY
$graphServiceClient = new GraphServiceClient($requestAdapter);
$requestBody = new ArchivePostRequestBody();
$requestBody->setMessageIds(['MC172851', 'MC167983', ]);
$requestResult = $graphServiceClient->admin()->serviceAnnouncement()->messages()->archive()->post($requestBody);