@N-M, Thanks for posting in Q&A. Currently, Microsoft store app new didn't have the feature to set detection rule. When a Microsoft Store Win32 app is published to a device as Required, but it is already installed (either manually or via the Microsoft Store for Business), Intune will take over the management of the application. But for Microsoft Store UWP apps, if the app is already installed, it will cause error and we need to uninstall all previous installations of the apps from the device. Here is a link with more details:
https://learn.microsoft.com/en-us/mem/intune/apps/store-apps-microsoft#microsoft-store-win32-apps
For our situation, I have two suggestions to avoid the issue. You can choose either of them:
Suggestion 1:
Uninstall the previous apps on these affected devices.
Suggestion 2:
Exclude the app deployment for these devices or users.
I understand the feature is not perfect now, You can feedback to the following Intune uservoice to improve it.
https://feedbackportal.microsoft.com/feedback/forum/ef1d6d38-fd1b-ec11-b6e7-0022481f8472
Thanks for your understanding.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.