Impersonation

The API supports impersonation on the LEXolution Service Queue to execute calls as another user.

It's important to note that the API must be started with a user who is allowed to impersonate through the STP UserManagement. This user must be in the "Administrators" group (a system group of the STP UserManagement).

Note: Direct impersonation on the underlying ServiceQueue does not work because it is not compatible with async/await. Therefore, impersonation must be performed at the API level, which will handle it appropriately.

To impersonate another user, you need to know their Xid from the STP UserManagement.

using(var context = dms.Impersonate(xidOfUser)) 
{
    var currentTasks = await dms.TasksAndNotices.GetActiveTasks();
}
This article has been automatically translated by an AI and may therefore contain errors.

Related to