From 6766db754e59fee26fb32c36fba1cbac06ef3765 Mon Sep 17 00:00:00 2001 From: fraliv13 <5892139+fraliv13@users.noreply.github.com> Date: Wed, 14 Feb 2024 13:34:24 +0200 Subject: [PATCH] Add ForcePasswordChange option to azuread.NewUser (#94) --- .../provisioning/provisioners/pulumi/entra_user.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/internal/controllers/provisioning/provisioners/pulumi/entra_user.go b/internal/controllers/provisioning/provisioners/pulumi/entra_user.go index 414fd7d..8f32078 100644 --- a/internal/controllers/provisioning/provisioners/pulumi/entra_user.go +++ b/internal/controllers/provisioning/provisioners/pulumi/entra_user.go @@ -40,9 +40,10 @@ func deployEntraUser(target provisioning.ProvisioningTarget, } user, err := azuread.NewUser(ctx, entraUser.Name, &azuread.UserArgs{ - UserPrincipalName: pulumi.String(entraUser.Spec.UserPrincipalName), - DisplayName: pulumi.String(entraUser.Spec.DisplayName), - Password: initialPassword, + UserPrincipalName: pulumi.String(entraUser.Spec.UserPrincipalName), + DisplayName: pulumi.String(entraUser.Spec.DisplayName), + Password: initialPassword, + ForcePasswordChange: pulumi.Bool(true), }) if err != nil { return nil, err