Reputation: 113
I am trying to add the Azure credentials (Microsoft Azure Service Principal) on jenkins server under
Credentials -> System -> Global Credentials.
Copied the subscription ID from my App service and added all the necessary information. When I click Verify Service Principal, I am getting The subscription id is not valid error.
I am pretty sure the subscription Id is correct. Am I missing something else?
Upvotes: 5
Views: 3539
Reputation: 51
I have faced similar issue and the solution is adding required permissions to the service principal which we are using to authenticate. With out any permissions on subscription it cannot validate.
Upvotes: 5
Reputation: 15
I have faced a similar error and I resolved it by using the subscription ID of the resource group where I created a Service Principal
Upvotes: 0
Reputation: 350
You will need to give the service principal access to your subscription by assigning a role to it. To assign a role to the service principal, go to the subscription level > access control (IAM) > add role assignment.
For Jenkins, I actually assign an owner or a contributor role to it. But you can choose the whatever role is appropriate for your use case. You can find more details about service principals here
Upvotes: 1
Reputation: 113
Even though i get that error i was able to save the settings and connect to Azure. It is definitely weird.
Upvotes: 1