1

I want to run an Azure Powershell task in my DevOps pipeline that access and modifies my Azure resources. For this task, I need to select either my Azure subscription or provide a Service Connection in the highlighted dropdown. enter image description here

Is there any way to run this script using my previously setup service principal (by using its Application ID, Tenant ID, App Secret and Subscription ID)? Or can I use a Powershell task and somehow do a "az login" using the above service principal?

1 Answer 1

2

Of course, you can. Just navigate to the Project Settings -> Service connections -> New service connection -> Azure Resource Manager -> Service principal (manual).

enter image description here

Then you can fix the values with the existing service principal -> verify and save.

enter image description here

In the Azure Powershell Task, simply select the service connection.

enter image description here

Sign up to request clarification or add additional context in comments.

1 Comment

Actually the answer is pretty straightforward. I wonder how it slipped my mind. I accept this as the answer.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.