
When I was doing some early learning on Environment Variables, I came upon the inclusion of Azure Key Vaults within Environment Variables and wanted to dig into this more.
If you haven’t seen this functionality, when you go and create a new Environment Variable in your solution you can select the source as an Azure Key Vault.
From there you then configure the connection to your key vault providing the Subscription Id (Guid), Resource Group, Key Vault names and finally your Secret Name.

From there when I went to link things up I then realized things were not going to be as easy as I hoped as I then had to ensure that the proper permissions were setup between PowerApps and Azure.

To accomplish the above task, you need to go to your subscription and search for the Microsoft.PowerPlatform Resource Provder and when selected, you want to “Register” the provider.

When complete, your variable will now be show in your list of environment variables. The cool thing here is that even as an admin, I can’t see what the value of the key vault field is (think about applications that need to connect to other services from within CRM and you don’t want people knowing where the data is coming from (of course until they run it in their code.

Once in your solution, you can then leverage it like any other environment variables.