Questions tagged [azure-service-principal]
235 questions
2
votes
1 answer
Can i use the same run as account for different azure automation accounts?
I have created a Run As Account for an Azure automation account. Is it possible to use the same Run As Account in a different automation account by creating a new automation connection with the same service principal?
I have tried to create a new …

MoonHorse
- 1,966
- 2
- 24
- 46
2
votes
1 answer
Is it possible to use service principal to access blob storage?
I am now trying to use Service Principal to access azure blob storage in nodes, instead of using connection string.
What I did (and succeeded) is using connection string as follows:
// connect via connection string
const…

Saligia
- 147
- 1
- 9
2
votes
1 answer
In Azure DevOps pipelines, how do I login to AZ CLI using the service principle details returned from the addSpnToEnvironment parameter?
I essentially have to run a Python script that has AZ CLI commands baked into the script and get spawned as processes from the subprocess module. In order for these commands to run, I need to be logged in to AZ CLI.
I have a AZ CLI task in my…

Samad Ahmed
- 159
- 1
- 6
2
votes
2 answers
Access service principal for Microsoft.Azure.WebSites Resource Provider (Microsoft Azure App Service) from Azure pipeline task
I want to create a key vault that will store a TLS certificate. This key vault needs to be accessible from Azure pipeline tasks, which will retrieve the said certificate and bind it to their apps. Microsoft mentions:
By default,…

14207973
- 489
- 6
- 19
2
votes
1 answer
Obtain OAuth token using Service Connection
I'm using Azure DevOps to deploy a web app and perform database migrations for an SQL Database. I have a Service Connection setup, and am able to deploy Azure resources using the Azure CLI, e.g.
- task: AzureCLI@2
displayName: 'Deploy Azure…

Cocowalla
- 13,822
- 6
- 66
- 112
2
votes
2 answers
Azure AD: Grant an appRoleAssignment for a service principal is failing with "code": "Request_ResourceNotFound"
I am trying to create a "service principal" for application and to grant admin consent for the permissions using Microsoft graph API.
I followed the following steps:
Created application in a tenant using graph API. My request body is:
{
…

Pooja_2304
- 53
- 6
2
votes
1 answer
Connecting to Azure SQL using Service Principal in NodeJS, but token is rejected
I am having trouble getting my NodeJS application to connect to an Azure SQL Database using the Service Principal. However, when I try to do the same thing with a C# Snippet, it works fine. What I have noticed is that the tokens returned by the auth…

Cameron Stubber
- 301
- 3
- 14
2
votes
1 answer
az acr login with subject name and issuer authentication error
I'm trying to authenticate to Azure container registry with the cli.
I'm using subject name and issuer authentication, and authenticating to azure with service principal.
that's what I do to login to azure
az login --service-principal…

Dana Shviro
- 21
- 1
1
vote
1 answer
Azure Service Principal Creation Permissions
I have Contributor permissions on an Azure Subscription, but I'm unable to create a Service Principal.
I get hit with the error
ServicePrincipalsClient.BaseClient.Post(): unexpected status 403 with OData error: Authorization_RequestDenied: When…

Metro
- 873
- 8
- 19
1
vote
1 answer
Azure multi subscription RBAC for a service princpal
I have 2 Azure subscriptions. Subscription_1 is used to create a VNET/SUBNET. Subscription_2 is used to create a VM inside that VNET.
To do the deployment, I am creating 2 Services principals. SPN_1 will deploy the VNET/SUBNET.
SPN_2 will deploy the…

MouIdri
- 1,300
- 1
- 18
- 37
1
vote
0 answers
Query Databricks Model Serving Endpoint with AAD token fails
I am trying to query databricks model serving endpoint with AAD token.
I first generate the AAD token as follows:
import requests
import json
url = f"https://login.microsoftonline.com/{tenant_id}/oauth2/v2.0/token"
payload = {
"client_id":…

kanimbla
- 858
- 1
- 9
- 23
1
vote
2 answers
How to set up an alert for secret expiry for service principal?
In Azure, We are having service principal for client apps in Azure. We want to set up an alert to our group, some days before the expiry of the secret. So that we can generate new ones and update our apps without downtime. Is there any way to get an…

sub
- 527
- 1
- 7
- 24
1
vote
2 answers
GET request to databricks jobs API with Azure Token, Incorrect Claim Exception
I am using the jobs API to get the status of the databricks job created by azure service principal. I create the azure token using the code below
import requests
import json
from databricks_cli.sdk.service import JobsService
from…

Rio
- 398
- 2
- 15
1
vote
1 answer
Access Control from Databricks to Azure Storage Accounts and Containers
Our Databricks workspace needs to access different data sets but we need to ensure that access control can be granted on a role or individual level. The data sets are planned to be available as files on Data Lake Gen2 that will be read into…

oebb-pv-cg
- 13
- 2
1
vote
1 answer
Adding a Groups Claim to a Service Principal via Azure CLI
It is obvious how to create a Service Principal (App Registration) via Azure CLI:
az ad sp create-for-rbac -n "My Service Principal" --scopes /subscriptions/the-subscription-guid
From the Azure Portal, you can add a Claims Group to the generated…

Adam
- 3,872
- 6
- 36
- 66