Skip to content

Commit 32db57a

Browse files
committed
chore: reduce scope on resource_access level
1 parent 7211be4 commit 32db57a

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

modules/meshcloud-sso/module.tf

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,12 @@ resource "azuread_application" "meshcloud_sso" {
3838
required_resource_access {
3939
resource_app_id = data.azuread_application_published_app_ids.well_known.result.MicrosoftGraph
4040

41-
resource_access {
42-
id = data.azuread_service_principal.msgraph.oauth2_permission_scope_ids["User.Read"]
43-
type = "Scope"
41+
dynamic "resource_access" {
42+
for_each = toset(["openid", "email", "profile"])
43+
content {
44+
id = data.azuread_service_principal.msgraph.oauth2_permission_scope_ids[resource_access.value]
45+
type = "Scope"
46+
}
4447
}
4548
}
4649
web {

0 commit comments

Comments
 (0)