Azure key vault: access denied

后端 未结 6 1119
孤城傲影
孤城傲影 2020-11-29 08:25

I have the following code for obtaining a secret from the Azure key vault:

public static async Task GetToken(string authority, string resource,         


        
6条回答
  •  半阙折子戏
    2020-11-29 09:02

    The question did specify using the Azure Portal, I've documented creating a service principal for Key Vault access here.

    Specifically from Step 2:

    Open the Key Vault in the Azure Portal and select the Access policies blade under Settings. Click Add New and click on Select principal - you'll have to enter the full name of the registered app you created in the previous step in the search box before it'll show up, at which point you'll be able to select it.

    You can either select an appropriate template from the top dropdown or choose Key, Secret or Certificate permissions manually. Don't worry about Authorized application at this stage.

    IMPORTANT: pressing the OK button will add your new policy to the list, but it will not be saved! Be sure to click Save before continuing.

提交回复
热议问题