teamworkDevice: runDiagnostics

Namespace: microsoft.graph

Important

APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.

Run and generate diagnostic logs for the specified Microsoft Teams-enabled device. This API triggers a long-running operation used to generate logs for a device.

Note: Microsoft is temporarily offering usage of the APIs for managing Microsoft Teams-enabled devices at no charge. Microsoft expects to charge for the use of some or all of these APIs in the future. Microsoft will provide advanced notice of pricing changes. For details about the current licensing model, see Licensing and payment requirements.

This API is available in the following national cloud deployments.

Global service US Government L4 US Government L5 (DOD) China operated by 21Vianet

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.

Permission type Least privileged permissions Higher privileged permissions
Delegated (work or school account) TeamworkDevice.ReadWrite.All Not available.
Delegated (personal Microsoft account) Not supported. Not supported.
Application TeamworkDevice.ReadWrite.All Not available.

HTTP request

POST /teamwork/devices/{teamworkDeviceId}/runDiagnostics

Request headers

Name Description
Authorization Bearer {token}. Required. Learn more about authentication and authorization.

Request body

Don't supply a request body for this method.

Response

If successful, this method returns a 202 Accepted response code. The response will also contain a Location header, which contains the location of the teamworkDeviceOperation resource. You can check the status of the run diagnostics operation by making a GET request to this location that returns whether the operation is queued, succeeded, or failed. If the operation succeeded, you can download the logs from the Microsoft Teams admin center.

This method also returns a 409 Conflict response code if the operation is already in queued state.

Examples

Request

POST https://graph.microsoft.com/beta/teamwork/devices/0f3ce432-e432-0f3c-32e4-3c0f32e43c0f/runDiagnostics

Response

HTTP/1.1 202 Accepted
Location: /teamwork/devices/0f3ce432-e432-0f3c-32e4-3c0f32e43c0f/operations/119eb06d-0c4b-4fb3-a754-33dd0d6b618c
Content-Type: text/plain
Content-Length: 0