1 min read

Solving container registry access issue in the Azure portal

This post will cover how to resolve an issue accessing a container registry in the Azure portal when one of the following messages appears:

Unable to load information to the grid. Reason: UnauthorizedDataError: UnauthorizedDataError: data set DataCache:6:9.
Unable to load information to the grid. Reason: {0}.

This issue is related to a missing access permission in the container registry, and to resolve it, we will create a role assignment using the Azure CLI.

Creating the new role assignment

First, use the az ad user list command to retrieve the id of the user who will be granted access to the container registry. Use the --display-name parameter to filter the result.

USER_DISPLAY_NAME="User Name"
USER_ID=$(az ad user list \
  --display-name=$USER_DISPLAY_NAME  \
  --query="[0].id" \
  --output tsv)

Next, use the az acr list command to retrieve the id of the container with the missing access permission. Use the --query parameter to filter the result by the container name.

CONTAINER_REGISTRY_NAME="mycontainerregistry"
CONTAINER_REGISTRY_ID=$(az acr list \
  --query "[?name=='$CONTAINER_REGISTRY_NAME'][].id" \
  --output tsv)

Finally, use the command az role assignment create to create a new role assignment. After that, the user will have access to the container registry. 🚀

ROLE="App Compliance Automation Administrator"
az role assignment create \
  --assignee $USER_ID \
  --scope $CONTAINER_REGISTRY_ID \
  --role $ROLE

Refresh the page and the issue should be resolved. If it persists, try logging out and back in again.