Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
abuzayd-abdullah-sp opened this issue Feb 27, 2024 · 3 comments
Assignees
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. Mgmt This issue is related to a management-plane library. needs-team-attention This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention This issue is responsible by Azure service team. Subscription

Comments

@abuzayd-abdullah-sp
Copy link

abuzayd-abdullah-sp commented Feb 27, 2024

Bug Report

  • import path of package in question: "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armsubscriptions"
  • SDK version: v1.3.0 (Commit: 651a245)
    • Specify the exact commit if possible; one way to get this is the REVISION
      column output by go list -m <module>, for example go list -m github.com/Azure/azure-sdk-for-go/sdk/azcore.
  • output of go version:
go version go1.21.4 darwin/amd64
  • What happened?
    I am trying to get the display names of my Azure tenants and using the Tenant List SDK API is not populating the fields I need.

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
 }
  • How can we reproduce it?
    Create a new tenants client with a client secret credential and try to go through the results and see if all fields are populated.

  • Anything we should know about your environment.
    Nothing special about my environment.

This issue looks similar to this previous issue: #11574

@github-actions github-actions bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-triage This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Feb 27, 2024
@jhendrixMSFT jhendrixMSFT added Mgmt This issue is related to a management-plane library. Subscription and removed needs-triage This is a new issue that needs to be triaged to the appropriate team. labels Feb 27, 2024
@github-actions github-actions bot added the needs-team-attention This issue needs attention from Azure service team or SDK team label Feb 27, 2024
@Alancere
Copy link
Member

reproduction, the result is the same as above
image

@Alancere Alancere added the Service Attention This issue is responsible by Azure service team. label Feb 29, 2024
Copy link

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. Mgmt This issue is related to a management-plane library. needs-team-attention This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention This issue is responsible by Azure service team. Subscription
Projects
None yet
Development

No branches or pull requests

3 participants