# "Unauthorized" error when pushing images to ACR with Service Principal account

{% hint style="info" %}
**Affected versions:** 2.13.0 to 2.16.0

**Fixed in:** 2.17.0
{% endhint %}

#### Issue Description

Users are unable to push images to the Azure Container Registry. The following error appears:

```
`Unauthorized: authentication required, visit  for more information."},"error":"unauthorized: authentication required, visit  for more information."}`
```

#### Cause

This issue is the result of using Service Principal accounts in the Azure Container Registry configuration in Portainer.

#### Workaround

You will need to configure your Azure Container Registry using the Access Key (Admin) account.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.portainer.io/faqs/known-issues/unauthorized-error-when-pushing-images-to-acr-with-service-principal-account.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
