Using Adal for accessing the Azure KeyVault on behalf of a user

前端 未结 2 952
旧巷少年郎
旧巷少年郎 2021-02-05 18:54

The following is in a console application and ClientID, RedirectUri is from the created native app in azure active directory.

var authContext = new Authenticatio         


        
2条回答
  •  借酒劲吻你
    2021-02-05 19:24

    You're on the right track! You need to configure AAD to be able to authorize users specifically for access to KeyVault. Try adding the following to your manifest.

    {
          "resourceAppId": "cfa8b339-82a2-471a-a3c9-0fc0be7a4093",
          "resourceAccess": [
            {
              "id": "f53da476-18e3-4152-8e01-aec403e6edc0",
              "type": "Scope"
            }
          ]
    }
    

    If that doesn't work, you can do this the old-fashioned way by visiting the old portal, navigating to AAD, your AAD Tenant, your application, and adding "Azure Key Vault" under the "permissions to other applications" section of the "Configure" tab.

提交回复
热议问题