# \#custom-scope-activity

**URL:** https://forum.uipath.com/tag/custom-scope-activity/2545.md

[Latest](https://forum.uipath.com/latest.md) · [Categories](https://forum.uipath.com/categories.md) · [Tags](https://forum.uipath.com/tags.md)

---

## [Custom Scope Activity with impersonation](https://forum.uipath.com/t/custom-scope-activity-with-impersonation/388370)

<div class="topic-metadata">

**Author:** [@alook](https://forum.uipath.com/u/alook)\
**Replies:** 1\
**Last updated:** [May 23, 2024, 9:45pm UTC](https://forum.uipath.com/t/custom-scope-activity-with-impersonation/388370 "2024-05-23T21:45:02Z")

</div>

Hi I’m trying to create a custom scope activity where everything inside is executed in an impersonated context using WindowsIdentity with a token created by the unmanaged function ‘LogonUser’ from advapi32.dll. Generall…
