Search code examples
visual-studiouwpprivileges

Access permissions for UWP


I have been doing some basic application access and privilege management. And to fully understand the access permissions of UWP applications, I decided to create one on my own and check.

As given in MSDN, the app was able to access the files mentioned here.

Now, I know that UWPs run in a sandboxed environment and they aren't given full access to all files in the system.

But is there any way for the admin user to grant the application rights to access files in the drive, for instance, the system32 file or a random text file that the user saved in C drive?


Solution

  • Yes, your app can declare the "broadFileSystemAccess" capability and then it can access all files in the system that the user has access to, given the user provides consent to this capability.

    See documentation here: https://learn.microsoft.com/en-us/windows/uwp/files/file-access-permissions