> For the complete documentation index, see [llms.txt](https://docs.realmjoin.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.realmjoin.com/es/automatizacion/runbooks/runbook-references/device/general/set-primary-user.md).

# Establecer usuario principal

### Descripción

Este runbook asigna un nuevo usuario principal a un dispositivo administrado por Intune. Resuelve el dispositivo administrado por Intune a partir del Entra Object ID proporcionado por el portal, recupera el usuario principal actual y los detalles del dispositivo, elimina la asignación de usuario existente y luego establece el usuario especificado como el nuevo usuario principal. La salida muestra la asignación anterior y la nueva con fines de auditoría.

### Ubicación

Dispositivo → General → Establecer usuario principal

**Nombre completo del runbook**

rjgit-device\_general\_set-primary-user

### Permisos

#### Permisos de aplicación

* **Tipo**: Microsoft Graph
  * DeviceManagementManagedDevices.ReadWrite.All
  * User.Read.All

### Parámetros

#### Id. del dispositivo

El ID de objeto de Entra del dispositivo. Rellenado previamente desde el portal RealmJoin y oculto en la interfaz de usuario.

| Propiedad            | Valor     |
| -------------------- | --------- |
| Requerido            | verdadero |
| Valor predeterminado |           |
| Tipo                 | Cadena    |

#### NewPrimaryUserId

El usuario que se asignará como el nuevo usuario principal del dispositivo.

| Propiedad            | Valor     |
| -------------------- | --------- |
| Requerido            | verdadero |
| Valor predeterminado |           |
| Tipo                 | Cadena    |

[Volver a la vista general de la referencia del runbook](/es/automatizacion/runbooks/runbook-references.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.realmjoin.com/es/automatizacion/runbooks/runbook-references/device/general/set-primary-user.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
