{"action":"created","issue":{"url":"https://api.github.com/repos/terraform-providers/terraform-provider-azurerm/issues/1758","repository_url":"https://api.github.com/repos/terraform-providers/terraform-provider-azurerm","labels_url":"https://api.github.com/repos/terraform-providers/terraform-provider-azurerm/issues/1758/labels{/name}","comments_url":"https://api.github.com/repos/terraform-providers/terraform-provider-azurerm/issues/1758/comments","events_url":"https://api.github.com/repos/terraform-providers/terraform-provider-azurerm/issues/1758/events","html_url":"https://github.com/terraform-providers/terraform-provider-azurerm/issues/1758","id":350055074,"node_id":"MDU6SXNzdWUzNTAwNTUwNzQ=","number":1758,"title":"Data source for Azure AD principals","user":{"login":"tomasaschan","id":1550920,"node_id":"MDQ6VXNlcjE1NTA5MjA=","avatar_url":"https://avatars0.githubusercontent.com/u/1550920?v=4","gravatar_id":"","url":"https://api.github.com/users/tomasaschan","html_url":"https://github.com/tomasaschan","followers_url":"https://api.github.com/users/tomasaschan/followers","following_url":"https://api.github.com/users/tomasaschan/following{/other_user}","gists_url":"https://api.github.com/users/tomasaschan/gists{/gist_id}","starred_url":"https://api.github.com/users/tomasaschan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomasaschan/subscriptions","organizations_url":"https://api.github.com/users/tomasaschan/orgs","repos_url":"https://api.github.com/users/tomasaschan/repos","events_url":"https://api.github.com/users/tomasaschan/events{/privacy}","received_events_url":"https://api.github.com/users/tomasaschan/received_events","type":"User","site_admin":false},"labels":[{"id":640744194,"node_id":"MDU6TGFiZWw2NDA3NDQxOTQ=","url":"https://api.github.com/repos/terraform-providers/terraform-provider-azurerm/labels/new-data-source","name":"new-data-source","color":"d4c5f9","default":false},{"id":845485548,"node_id":"MDU6TGFiZWw4NDU0ODU1NDg=","url":"https://api.github.com/repos/terraform-providers/terraform-provider-azurerm/labels/service/authentication","name":"service/authentication","color":"85eab6","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-08-13T14:31:09Z","updated_at":"2018-11-04T15:42:46Z","closed_at":"2018-11-04T15:42:46Z","author_association":"NONE","body":"### Community Note\r\n\r\n* Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request\r\n* Please do not leave \"+1\" or \"me too\" comments, they generate extra noise for issue followers and do not help prioritize the request\r\n* If you are interested in working on this issue or have submitted a pull request, please leave a comment\r\n\r\n### Description\r\n\r\nWhen creating resources, one often wants to also create role bindings for IAM, but I can't find a way to reference Azure AD principals with the currently available data sources. It would be nice to be able to query for e.g. users by email in the same way I can query for applications by name, and get e.g. their object ids.\r\n\r\n### New or Affected Resource(s)\r\n\r\n* `data azurerm_azuread_user`\r\n\r\n### Potential Terraform Configuration\r\n```hcl\r\nprovider \"azurerm\" {}\r\n\r\ndata azurerm_azuread_user \"tomas\" {\r\n    username = \"tomas@example.com\"\r\n}\r\n\r\noutput \"tomas_object_id\" {\r\n    id = \"${data.azurerm_azuread_user.tomas.id}\"\r\n}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/terraform-providers/terraform-provider-azurerm/issues/comments/435680107","html_url":"https://github.com/terraform-providers/terraform-provider-azurerm/issues/1758#issuecomment-435680107","issue_url":"https://api.github.com/repos/terraform-providers/terraform-provider-azurerm/issues/1758","id":435680107,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNTY4MDEwNw==","user":{"login":"tombuildsstuff","id":666005,"node_id":"MDQ6VXNlcjY2NjAwNQ==","avatar_url":"https://avatars1.githubusercontent.com/u/666005?v=4","gravatar_id":"","url":"https://api.github.com/users/tombuildsstuff","html_url":"https://github.com/tombuildsstuff","followers_url":"https://api.github.com/users/tombuildsstuff/followers","following_url":"https://api.github.com/users/tombuildsstuff/following{/other_user}","gists_url":"https://api.github.com/users/tombuildsstuff/gists{/gist_id}","starred_url":"https://api.github.com/users/tombuildsstuff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tombuildsstuff/subscriptions","organizations_url":"https://api.github.com/users/tombuildsstuff/orgs","repos_url":"https://api.github.com/users/tombuildsstuff/repos","events_url":"https://api.github.com/users/tombuildsstuff/events{/privacy}","received_events_url":"https://api.github.com/users/tombuildsstuff/received_events","type":"User","site_admin":false},"created_at":"2018-11-04T15:42:46Z","updated_at":"2018-11-04T15:42:46Z","author_association":"CONTRIBUTOR","body":"hey @tomasaschan \r\n\r\nThanks for opening this issue - apologies for the delayed response here!\r\n\r\nSupport for a Data Source for AzureAD Principals (Users / Groups) has previously been requested in #1272; so that we don't have multiple issues open tracking the same thing I'm going to close this issue in favour of #1272.\r\n\r\nThanks!"}}
{"actor":{"display_login":"tombuildsstuff"}}