Questions tagged [azure-managed-identity]

Azure AD managed identities for Azure resources.

For more information, see the documentation.

795 questions
2
votes
1 answer

an attempt was made to access a socket in a way forbidden by its access permissions calling Azure IMDS

I am having trouble calling the Azure Instance Metadata Service (IMDS) from an App Service to get a token. We have an App Service that was created >18 months ago. Recently we enabled Managed Identity for it. On the azure portal page there is a…
2
votes
1 answer

Connect to Cosmos DB account using Azure Managed Service Identity

Is it possible to connect to Azure cosmos DB using MSI the same way as it is possible for Azure SQL? That's how it works for Azure SQL Server using (var connection = new SqlConnection(connectionString)) { connection.AccessToken = await new…
VinSmile
  • 756
  • 6
  • 10
2
votes
2 answers

python azure functions v2 msiauthentication

I am trying to figure out what we could do in v1 by setting the MSI_ENDPOINT and MSI_SECRET via run.ps1 script. Function will access a number of other services using the service assigned identity. Is there a way to set this up so my local dev…
2
votes
2 answers

Azure Managed Service Identity: Failed to acquire tokens after 12 times

I have a VM with a system-assigned managed service identitiy. I gave it permission to pull images from the Azure container registry. I followed this tutorial. I worked fine yesterday. But when wanting to pull a new image, it said to re-authenticate.…
2
votes
3 answers

Using Event Hubs binding for Azure Functions with managed identities?

I'm trying to find information on how to set up the connection strings in a Function App binding so that the app uses managed identities to access Event Hubs and other resources. I'm able to use managed identities in other applications by getting an…
Eli Pulsifer
  • 713
  • 9
  • 25
2
votes
1 answer

Transient error handling for Azure MSI authentication

Are there errors that Managed Service Identity (MSI) authentication that are transient and worthwhile retrying? Reading through the implementation I can see HttpRequestException and Exception are absorbed by the framework and rethrown as…
2
votes
1 answer

.NetCore API fails to get token from Azure CLI using MSI

I have a couple APIs and I'm in the process of changing the way I access my Azure SQL Databases from a simple credential to a Managed Service Identity model leveraging our Azure Active Directory. I've had no problem doing this for my older .Net API…
2
votes
1 answer

Azure Managed Service Identity in C# to connect to Azure SQL Server

I'm running one Microsoft doc tutorial on how to set up MSI access to Azure SQL. This article: https://learn.microsoft.com/en-gb/azure/app-service/app-service-web-tutorial-connect-msi I succesfully get the connection string from my Azure web config…
2
votes
2 answers

Hard dependency on Microsoft.IdentityModel.Clients.ActiveDirectory 3.14.2

I am trying to use Azure Managed Service Identity with Azure functions and KeyVault. I want to be able to get secrets from the vault and also use ADAL to authenticate with a certificate to get access to SharePoint Online. I'm developing locally with…
Jeremy
  • 21
  • 2
2
votes
3 answers

Cannot connect to Azure SQL using PowerShell in an MSI enabled function app

Recently created a function app running. The function app hosts a C# and PowerShell function which works as expected with MSI enabled PowerShell code below, full code in Github Write-Output "PowerShell Timer trigger function executed…
2
votes
1 answer

App Service to EntityFramework using MSI

I'm trying to retrofit MSI to an existing app. The original app's DbContext used only a Constructor that found a ConnectionString by the same name in the web.config. I've modified it to use a DbConnectionFactory to inject an AccessToken. public…
user9314395
  • 407
  • 1
  • 4
  • 13
2
votes
1 answer

Creating resource groups from Azure Web App Managed Service Identity

I'm trying to build a Bot using MS Bot framework and this bot is hosted as an Azure Web App. I've added code to create resource groups using the Microsoft.Azure.Management.Fluent APIs AzureCredentialsFactory f = new AzureCredentialsFactory(); var…
GeertvdC
  • 2,758
  • 1
  • 22
  • 26
2
votes
4 answers

How to get a reference to an Azure MSI for an app service?

I have been testing out the recently released Managed Service Identity (MSI) for Azure and have successfully created an MSI for our App Services using the ARM template approach described in the documentation here: How to use Azure Managed Service…
Marcus
  • 143
  • 1
  • 5
1
vote
1 answer

How to add user assigned identity to EventGridDomain

I'm programmatically creating EventGrid Domain's and Topics using the Azure.ResourceManager libraries. I'd like to assign a user assigned identity to the domain as well. I can see that the EventGridDomainData object has an Identity property and that…
1
vote
0 answers

Bicep: SQL Server deployment with managed identity for Azure functions

I am attempting to use bicep to replicate the following scenario: An Azure SQL instance with a single database An Azure function which needs to connect to that database via managed identity. As it stands, once the infrastructure is deployed we…