Error while adding Azure credentials on Jenkins Error while adding Azure credentials on Jenkins jenkins jenkins

Error while adding Azure credentials on Jenkins


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.Hope it helps


Even though i get that error i was able to save the settings and connect to Azure. It is definitely weird.


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