The following is in a console application and ClientID, RedirectUri is from the created native app in azure active directory.
var authContext = new Authenticatio
Here is what you need to do:
The steps were documented in an Azure article last September at
https://blogs.technet.microsoft.com/kv/2016/09/17/accessing-key-vault-from-a-native-application/
This article explains how to perform the above steps to access Azure KeyVault programmatically from a native application (as opposed to a service application) without having to rely on the Azure Powershell trick mentioned by @benv.