-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed as not planned
Labels
ClientThis issue points to a problem in the data-plane of the library.This issue points to a problem in the data-plane of the library.CosmosService AttentionWorkflow: This issue is responsible by Azure service team.Workflow: This issue is responsible by Azure service team.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Description
Context:
I am trying to call the Cosmos DB GET API from an Azure PowerShell task within an Azure DevOps (ADO) build pipeline. To authenticate, I opted for a service connection using Workload Identity Federation (WIF).
Steps Taken:
- Created a service connection in Azure DevOps.
- Using the service connection's issuer and subject, I created a Federated Identity Credential in the Managed Identity (MSI) that has the required permissions on the Cosmos DB account.
- Executed a PowerShell script to call the GET REST API for Cosmos DB.
Issue:
I encountered the following error during execution:
{
"code": "Unauthorized",
"message": "Request blocked by Auth <cosmos db account>: Provided AAD token was issued by the authority [<Issuer of service connection>] which is not trusted by this database account. Please ensure the token has been issued by the AAD tenant(s) <TenantId of the cosmos db>."
}
This error occurs despite the MSI being in the same tenant as the Cosmos DB account.
Request for Help:
Resolution: What steps can I take to resolve this issue?
Alternate Approach: If this method isn’t feasible, is there an alternate approach for securely calling the Cosmos DB GET API from an ADO pipeline using Azure PowerShell?
Any guidance would be greatly appreciated!
Metadata
Metadata
Assignees
Labels
ClientThis issue points to a problem in the data-plane of the library.This issue points to a problem in the data-plane of the library.CosmosService AttentionWorkflow: This issue is responsible by Azure service team.Workflow: This issue is responsible by Azure service team.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that