diff --git a/azuread/helpers/graph/application.go b/azuread/helpers/graph/application.go index 691b1e886..8fce1bdc6 100644 --- a/azuread/helpers/graph/application.go +++ b/azuread/helpers/graph/application.go @@ -126,8 +126,8 @@ func FlattenAppRoles(in *[]graphrbac.AppRole) []interface{} { if role.IsEnabled != nil { appRole["is_enabled"] = *role.IsEnabled } - if role.Value != nil { - appRole["value"] = *role.Value + if v := role.Value; v != nil && *v != "" { + appRole["value"] = *v } appRoles = append(appRoles, appRole) } diff --git a/azuread/resource_application_test.go b/azuread/resource_application_test.go index 46e9bde0e..633f064f3 100644 --- a/azuread/resource_application_test.go +++ b/azuread/resource_application_test.go @@ -724,7 +724,7 @@ resource "azuread_application" "test" { app_role { allowed_member_types = [ "User", - "Application", + //"Application", ] description = "Admins can manage roles and perform all task actions"