Hi, For some action, I cannot use current accessing user but I need to change "run as" special service user.
But I cannot find any way to change current accessing user. Any idea would be great!
Thank you.
Hi, For some action, I cannot use current accessing user but I need to change "run as" special service user.
But I cannot find any way to change current accessing user. Any idea would be great!
Thank you.
CSContext.Current.User is not part of the supported API and should not be used by customizations.
To temporarily set the accessing user, you should use RunAsUser from the Users API:
Here's a C# sample
Apis.Get<IUsers>().RunAsUser(username, () => { // Your Code });