If you just use RemovePackageAsync() to remove apps installed via the store, you will get a 'System.UnauthorizedAccessException: Access is denied' exception. In order to uninstall store apps, you also need to add the restricted capability 'packageManagement' to your app. This should be pointed out in the documentation here.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
ID: a808baee-242a-e412-f8a0-ca9b49974dfb
Version Independent ID: bebc5463-e378-d464-91b2-b73e65c06559
If you just use RemovePackageAsync() to remove apps installed via the store, you will get a 'System.UnauthorizedAccessException: Access is denied' exception. In order to uninstall store apps, you also need to add the restricted capability 'packageManagement' to your app. This should be pointed out in the documentation here.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.