To Create Docker Hub Connection with Azure DevOps
- Create Azure Account
- Create DevOps Account
- Create your Organization
- Create your Project “WebappWithDatabase-CICD”
1. IN CASE BOTH DEVOPS AND AZURE ARE CREATED WITH DIFFERENT IDs
AZURE
Create AD Azure Account
Configure Azure AD Application in the Target Tenant:
- Granting Access in the Azure portal
- Open Azure Active Directory or "Microsoft Entra ID"
- App registrations > New registration
- Name: DevOpsServiceConnection
- Redirect URI: Leave blank (not needed here)
- Create
- Once created, note the Application (client) ID
- We used this Option
- Create Federated credentials to AD
- in your AD click
- Copy Issuer an value/subject from DevOps Add Service connections popup (2nd Popup)
Grant the Role Assignment: You need to assign the identified service principal or managed identity the appropriate RBAC role on the target Azure subscription
- Using the Azure Portal:
- Go to the Azure subscription mentioned in the error ('5cXX').
- Navigate to “Access control (IAM).”
- Click "+ Add" and then “Add role assignment.”
- In the "Role" dropdown, select the appropriate role (e.g., "Reader" or "Contributor").
- In the "Assign access to" section, select "User, group, or service principal."
- Search for the Client ID ('5XX') or Object ID ('5XX') of your service principal or managed identity.
- Select it and click "Save."
DEVOPS
Connect DevOps with Azure if both are using different Credentials
- Create a Service Connection in Azure DevOps:
- Project Settings > Service connections
- Click on New service connection and select Azure Resource Manager.
- Click Next
- Verify and save
New Connection with Azure Account and is reflecting in Service Connection listing
2. IN CASE BOTH DEVOPS AND AZURE ARE CREATED WITH SAME IDs
DEVOPS
Connect DevOps with Azure if both are using different Credentials
- Create a Service Connection in Azure DevOps:
- Project Settings > Service connections
- Click on New service connection and select Azure Resource Manager.
- Subscription, Resource Group automatically selected if both account open
New Connection with Azure Account and is reflecting in Service Connection listing
See documentation at