Skip to content

Latest commit

 

History

History
117 lines (90 loc) · 4.19 KB

File metadata and controls

117 lines (90 loc) · 4.19 KB
title Create registeredUser
description Add a registered user for the device.
author myra-ramdenbourg
ms.localizationpriority medium
ms.subservice entra-directory-management
doc_type apiPageType
ms.date 10/25/2024

Create registeredUser

Namespace: microsoft.graph

Add a registered user for the device.

[!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]

[!INCLUDE rbac-devices-apis-write]

HTTP request

You can address the device using either its id or deviceId.

POST /devices/{id}/registeredUsers/$ref
POST /devices(deviceId='{deviceId}')/registeredUsers/$ref

Request headers

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

Request body

In the request body, supply a JSON representation of directoryObject object.

Response

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

Example

Request

The following example shows a request.

POST https://graph.microsoft.com/v1.0/devices/{id}/registeredUsers/$ref
Content-type: application/json

{
  "@odata.id": "https://graph.microsoft.com/v1.0/directoryObjects/{id}"
}

[!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]


In the request body, supply a JSON representation of directoryObject object.

Response

The following example shows the response. Note: The response object shown here might be shortened for readability.

HTTP/1.1 204 No content