Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def create_registry_client(self):

account_url = os.environ["CONTAINERREGISTRY_ENDPOINT"]

client = ContainerRegistryClient(account_url, DefaultAzureCredential())
client = ContainerRegistryClient(account_url, DefaultAzureCredential(),audience="https://management.azure.com")
# [END create_registry_client]

def basic_sample(self):
Expand All @@ -46,7 +46,7 @@ def basic_sample(self):
account_url = os.environ["CONTAINERREGISTRY_ENDPOINT"]

# Instantiate the client
client = ContainerRegistryClient(account_url, DefaultAzureCredential())
client = ContainerRegistryClient(account_url, DefaultAzureCredential(),audience="https://management.azure.com")
with client:
# Iterate through all the repositories
for repository_name in client.list_repository_names():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def delete_old_tags(self):
# [START list_repository_names]
account_url = os.environ["CONTAINERREGISTRY_ENDPOINT"]
credential = DefaultAzureCredential()
client = ContainerRegistryClient(account_url, credential)
client = ContainerRegistryClient(account_url, credential,audience="https://management.azure.com")

for repository in client.list_repository_names():
print(repository)
Expand Down