Conditional access policies for individual Power Apps will be general availible in September 2022 (currently in public preview) and will give us a lot of control on how users can access Power Apps. With the use of Azure Active Directory Conditional Access, we can add extra layers of security to individual Power Apps to contain sensitive data. In my project we needed to create a conditional access policy to prevent a canvass app being opened on any mobile device. With Conditional access policies for individual Power Apps we were able to do this.
Setting up conditional access
- Open the authentication context in Azure Active Directory.
- Click on New authentication context.
- Fill in the Name and Description.
- Select Publish to apps.
- Select an ID (it does not matter which one).
- Open the Policies in Azure Active Directory.
- Click on New policy.
- Give the policy a name.
- Select the users and/or group to apply the policy to
- Select the authentication context created earlier.
- Create the conditions and select all device platforms besides windows.
- Select the Block access under Grant to block all the device platforms besides windows.
- Click on Save.
- The policy is now created, but still needs to be connected to the canvas app.
Connect the conditional access to the canvass app
The policy needs to be connected to the canvas app with PowerShell.
- Open PowerShell as an administrator.
- Connect PowerShell to the Power Platform with the following command.
- The PowerShell command requires the EnvironmentName (ID of the environment), AppName (ID of the canvass app) and the ID of the authentication context. The ID’s in my example are changed for security reasons.
- The conditional access policy is now connected to the canvas app.