# Set Primary User

> Sets the primary user on a unit.

Source: https://docs.capaone.com/capainstaller/sdk-capainstaller-software-development-kit-functions/unit-functions/set-primary-user/  
Product: CapaInstaller — a separate CapaSystems product; do not apply this page to any other.

## Description

Sets the primary user on a unit

## Syntax

Public Function SetPrimaryUser(ByVal **uuid** As String, **userIdentifier** As String) As Boolean

## Parameters

***uuid(String)***

The uuid of the unit (or device)

***userIdentifier***

the user that you want to set as primary on the unit

Formats accepted as identifier:

| Format   | Example                                           |
|:---------|:--------------------------------------------------|
| SID      | S-1-5-21-2955346805-1668228357-4012311724-500     |
| UPN      | user@example.com                                  |
| Name     | TestUser                                          |

## Return value

The function returns true if successful.

## Example

**VBScript**

|                                                                                                                                                                 |
|:----------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `Set` `oCMS = CreateObject(``"CapaInstaller.SDK"``)` `wscript.echo oCMS.SetPrimaryUser(``"B16BAC7B-2975-431C-A380-B702B1A83AF4"``,``"user@example.com``"``)` |
