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

Retrieve tenant display name from azuread_client_config? #1443

Open
webstean opened this issue Jul 19, 2024 · 1 comment
Open

Retrieve tenant display name from azuread_client_config? #1443

webstean opened this issue Jul 19, 2024 · 1 comment

Comments

@webstean
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritise this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritise the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Can we have a way to obtain the display name of the Azure/Entra ID tenant.
data "azuread_client_config already has the tenant_id, what about adding "tenant_display_name?

New or Affected Resource(s)

  • azuread_client_config

Potential Terraform Configuration

data "azuread_client_config" "current" {}

output "tenant_display_name" {
  value = data.azuread_client_config.current.tenant_display_name
}
# Copy-paste your Terraform configurations here - for large Terraform configs,
# please use a service like Dropbox and share a link to the ZIP file. For
# security, you can also encrypt the files using our GPG public key.

References

  • #0000
@nbaju1
Copy link

nbaju1 commented Jul 31, 2024

The tenant ID is readily available on the service principal object. Retrieving the tenant display name will require a separate call to the organization endpoint and requires at minimum the Organization.Read.All permission. Perhaps better to implement the tenant object as a separate data source?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants