Hi Vivian Escalante - Thanks for raising the query. To retrieve a device's display name and device name using the Microsoft Graph API, follow these steps:
- API Endpoint: Use
GET /teamwork/devices/{id}
. See the Microsoft Graph API documentation for details. - Permissions: Ensure your app has the
TeamworkDevice.Read.All
permission. Refer to the Microsoft Graph permissions reference. - Request Headers: Include the authorization header:
Authorization: Bearer {token}
. - Sample Request: Use cURL to make the request:
curl -H "Authorization: Bearer {token}" -X GET https://graph.microsoft.com/v1.0/teamwork/devices/{id}
- Response: A successful response will return a
200 OK
status with ateamworkDevice
object containing the display name and device name. - Microsoft Teams JavaScript Client Library: If building an app for Microsoft Teams, use the Microsoft Teams JavaScript client library to request permissions for device capabilities and update your app manifest accordingly.
- Additional Information: Note that APIs under the /beta version are subject to change. Check for availability in the v1.0 version.
Following these steps will help you retrieve the display name and device name of a Microsoft Teams-enabled device.