Skip to main content

UserSetAuthLevel

Changes the authorization level of a user account, optionally scoping the permission to a specific network and mailbox.

:::caution Established API The SOAP API is in maintenance mode. For new integrations use the REST equivalent. :::

:::warning Elevated Access Risk Root and TechOps authorization levels grant broad system-wide access. Assign these levels only to trusted administrators and review assignments regularly. :::

Method Signature

UserIDInfo UserSetAuthLevel(string SessionID, int UserID, int NetworkID, int MailboxID, AuthLevel AuthLevel)

Parameters

ParameterTypeRequiredDescription
SessionIDstringYesActive session token from Login()
UserIDintYesUnique identifier of the user whose auth level is being changed
NetworkIDintYesNetwork scope for the auth level; use 0 to apply at the system level
MailboxIDintYesMailbox scope for the auth level; use 0 to apply at the network level
AuthLevelAuthLevelYesNew authorization level to assign

Response Object — UserIDInfo

Returns the updated UserIDInfo object reflecting the new authorization level.

FieldTypeDescription
UserIDintUnique identifier of the user
LoginstringLogin name
EmailstringEmail address
FirstNamestringFirst name
LastNamestringLast name
NetworkIDintNetwork scope
MailboxIDintMailbox scope
AuthLevelAuthLevelUpdated authorization level
StatusStatusAccount status (unchanged)
CreateddateTimeAccount creation timestamp
<!-- Example response XML -->
<UserIDInfo>
<UserID>5001</UserID>
<Login>jsmith</Login>
<Email>jsmith@example.com</Email>
<FirstName>John</FirstName>
<LastName>Smith</LastName>
<NetworkID>10</NetworkID>
<MailboxID>100</MailboxID>
<AuthLevel>MailboxAdmin</AuthLevel>
<Status>Active</Status>
<Created>2024-01-15T09:30:00</Created>
</UserIDInfo>

ENUMs

AuthLevel

ValueDescription
NoChangeNo change to current level
RootFull system access — assign sparingly
TechOpsTechnical operations access — assign sparingly
NetOpsNetwork operations access
NetworkAdminNetwork administrator
NetworkUserNetwork-level user
MailboxAdminMailbox administrator
MailboxUserMailbox-level user
TPUserTrading partner user
GeneralGeneral / limited access

Code Examples

// .NET 10 — dotnet-svcutil generated proxy
using ECGridOSClient;

var client = new ECGridOSPortTypeClient();

// Promote user 5001 to MailboxAdmin scoped to network 10, mailbox 100
UserIDInfo updated = await client.UserSetAuthLevelAsync(
sessionID,
UserID: 5001,
NetworkID: 10,
MailboxID: 100,
AuthLevel: AuthLevel.MailboxAdmin);

Console.WriteLine($"UserID: {updated.UserID}");
Console.WriteLine($"AuthLevel: {updated.AuthLevel}");

REST Equivalent

See Set RolePOST /v2/users/role.