How to programally check if the user-assigned managed identity have access/permissions to the key from key vault in an other tenant?

Siqing Zheng 40 Reputation points
2024-04-15T05:35:43.28+00:00

Hi,

There is two tenant A, B.

tenant A have two application, 1. manageApp used by my program 2. CMEK-app using to get permisstion from tenant B by admin consent. And one user-assigned managed id configured as federated identity with the CMEK-app used to get access/permission to the key. I follow the article and have convert the steps to configure the key for cross tenant.

The question is how to have a way to verify that the app or user-assinged managed id from tenant A got permission to the key with a cheap way as the program is managedApp without know the tenant B's subscribeID or resourceGroup, like in AWS they have describeKey to help get status of the key.

Azure Key Vault
Azure Key Vault
An Azure service that is used to manage and protect cryptographic keys and other secrets used by cloud apps and services.
1,118 questions
Azure
Azure
A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.
944 questions
{count} votes

Accepted answer
  1. Shweta Mathur 27,691 Reputation points Microsoft Employee
    2024-04-19T12:12:02.32+00:00

    Hi @Siqing Zheng ,

    Thanks for detailed case scenario.

    Currently you cannot use Managed identities across tenants as mentioned here. The solution for you would be to use a Service principal for now.

    I would suggest you post this idea at the Azure Feedback Portal, which is monitored by the product team for feature enhancements.

    Hope this will help.

    Thanks,

    Shweta

    Please remember to "Accept Answer" if answer helped you.


0 additional answers

Sort by: Most helpful