Forum Discussion

wandawork's avatar
wandawork
Copper Contributor
Sep 08, 2022

Best way to store Azure Key/Secret

Hello.

I have a on prem C# console application which connects to the APIs of the Dynamics 365 Finance. 

In order to make the connection, we will need the Tennent id, client id, secret and etc. However, we would like to store these values especially the secret in a very secure way. We tried it in machine.config. But now trying to store in Azure Key vault | Secret. 

I used what is suggested in this article: It works perfectly since I log in using my credentials on my dev machine for authentication.

https://docs.microsoft.com/en-us/azure/key-vault/secrets/quick-create-net?tabs=azure-cli

How can this be setup in production when the console app is a scheduled window task? e.g. do I use a service account for authentication? Do I have to login every time especially after the machine is rebooted?

If storing the secret, client id, tenant id is not necessary in Azure key vault, what would you suggest?

Thanks in advance!

No RepliesBe the first to reply