Azure / Azure/azure-rest-api-specs

domain list empty

Open
#21,303 8 comments 0 reactions 0 assignees View on GitHub
Client customer-reported Mgmt needs-team-attention question resource-manager Service Attention
Dominant language
TypeSpec
Stars
3.1k
Forks
5.9k
Avg merge
2d 22h
Merged PRs (30d)
444

Description

When I run the following code the domain list returned is unexpectedly empty. The code runs without errors.
I am not sure why this would be the case as when I create login credentials from the command line and use creds = identity.AzureCliCredential() instead of generating creds it works.

import functools
import logging
from typing import Any, Dict, List
from azure import identity
from azure.identity import ClientSecretCredential
from azure.mgmt import resource, storage, web
subscription_id = "redacted"
tenant_id = "redacted"
client_id = "redacted"
client_secret = "redacted"
credential = ClientSecretCredential(tenant_id=tenant_id, client_id=client_id, client_secret=client_secret )
client = resource.SubscriptionClient(credential=credential)
domains = {t.tenant_id: t.domains for t in client.tenants.list()}

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the supplied Python example with ClientSecretCredential and compare its SubscriptionClient tenants.list() result with AzureCliCredential. The payload names no repository file or test; done means identifying whether the empty domains value is expected credential/API behavior and documenting or correcting the affected REST API specification.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, python
Domain
api, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.