Skip to content

Commit 5dcd211

Browse files
authored
Merge pull request #491 from KelvinTegelaar/dev
[pull] dev from KelvinTegelaar:dev
2 parents 777defa + 4357c79 commit 5dcd211

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Identity/Administration/Users/Invoke-AddUser.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ function Invoke-AddUser {
1515
$UserObj = $Request.Body
1616

1717
if ($UserObj.Scheduled.Enabled) {
18+
$Username = $UserObj.username ?? $UserObj.mailNickname
1819
$TaskBody = [pscustomobject]@{
1920
TenantFilter = $UserObj.tenantFilter
20-
Name = "New user creation: $($UserObj.mailNickname)@$($UserObj.PrimDomain.value)"
21+
Name = "New user creation: $($Username)@$($UserObj.PrimDomain.value)"
2122
Command = @{
2223
value = 'New-CIPPUserTask'
2324
label = 'New-CIPPUserTask'

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Tenant/GDAP/Invoke-ExecGDAPInvite.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,10 @@ function Invoke-ExecGDAPInvite {
9393
'InviteUrl' = $InviteUrl
9494
'OnboardingUrl' = $OnboardingUrl
9595
'RoleMappings' = [string](@($RoleMappings) | ConvertTo-Json -Depth 10 -Compress)
96-
'Technician' = $Technician
96+
'Technician' = [string]$Technician
9797
}
9898

99-
if ($Reference) { $InviteEntity['Reference'] = $Reference }
99+
if ($Reference) { $InviteEntity['Reference'] = [string]$Reference }
100100

101101
Add-CIPPAzDataTableEntity @Table -Entity $InviteEntity
102102

@@ -125,7 +125,7 @@ function Invoke-ExecGDAPInvite {
125125
Invite = $InviteEntity
126126
}
127127
}
128-
'Update'{
128+
'Update' {
129129
$Invite = Get-CIPPAzDataTableEntity @Table -Filter "PartitionKey eq 'invite' and RowKey eq '$InviteId'"
130130
if ($Invite) {
131131

0 commit comments

Comments
 (0)