Azure / azure-sdk-for-go

This repository is for active development of the Azure SDK for Go. For consumers of the SDK we recommend visiting our public developer docs at:
https://docs.microsoft.com/azure/developer/go/
MIT License
1.65k stars 846 forks source link

ListTenants returns nil for DisplayName & Domains instead of its actual values #22464

Open abuzayd-abdullah-sp opened 9 months ago

abuzayd-abdullah-sp commented 9 months ago

Bug Report

Here is roughly the code I am using with appropriate values redacted or left out for brevity.

var clientOptions azidentity.ClientSecretCredentialOptions

cred := azidentity.NewClientSecretCredential(
        azureTenantID,
        clientID,
        secret,
        &clientOptions,
    )

client, err := subscriptions.NewTenantsClient(cred, nil)
if err != nil {
        // <snip>
}

pager := client.NewListPager(nil)

for pager.More() {
page, err := pager.NextPage(ctx)
if err != nil {
    // <snip>
}

for _, value := range page.Value {
     b, _ := json.Marshal(value)
     fmt.Println(string(b))
}
}

Instead I got a record with only the ID, TenantID and TenantCategory populated:

{
      "Country": null,
      "CountryCode": null,
      "DefaultDomain": null,
      "DisplayName": null,
      "Domains": null,
      "ID": "/tenants/<tenant id redacted>",
      "TenantBrandingLogoURL": null,
      "TenantCategory": "Home",
      "TenantID": "<tenant id redacted>",
      "TenantType": null
 }

This issue looks similar to this previous issue: https://github.com/Azure/azure-sdk-for-go/issues/11574

Alancere commented 9 months ago

reproduction, the result is the same as above image

github-actions[bot] commented 9 months ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @anuragdalmia @ArcturusZhang @lirenhe @ramaganesan-rg @shilpigautam @tadelesh.

abuzayd-abdullah-sp commented 8 months ago

@Alancere Are there any updates on this on the SDK side?