Could you please follow the below steps to resolve this issue:
- Go to Azure Portal -> Subscriptions -> Ensure your subscription is active.
- Ensure the Service Principal has Contributor or Owner access to the subscription.
- Ensure Your Azure DevOps Org Is Connected to Microsoft Entra ID -> Go to Azure DevOps -> Organization Settings -> Microsoft Entra ID.
- Go to Project Settings -> Service Connections -> Create new Service Connection -> Select Docker Registry -> Instead of selecting the service principal, try selecting the Others for Registry type and enter the required details.
or You can select the Registry type as Azure Container Registry -> Authentication type -> Managed Service Identity.
Additional References:
Hope this helps!
Please Let me know if you have any queries.