[GH-ISSUE #1615] New CIPP user invite script doesnt work #871

Closed
opened 2026-03-02 12:45:55 +03:00 by kerem · 7 comments
Owner

Originally created by @MBstatsara on GitHub (Jul 10, 2023).
Original GitHub issue: https://github.com/KelvinTegelaar/CIPP/issues/1615

Originally assigned to: @MBstatsara on GitHub.

Description

Go to settings, click maintenance select add-cippuser.ps1

This doesnt work unless a custom domain is valid, i have edited the script and tested at my end and it works with the default domain if the value in the script is null.

Environment data

Frontend Version
Latest: 3.7.0
Current: 3.7.0
API Version
Latest: 3.7.2
Current: 3.7.2
Originally created by @MBstatsara on GitHub (Jul 10, 2023). Original GitHub issue: https://github.com/KelvinTegelaar/CIPP/issues/1615 Originally assigned to: @MBstatsara on GitHub. ### Description Go to settings, click maintenance select add-cippuser.ps1 This doesnt work unless a custom domain is valid, i have edited the script and tested at my end and it works with the default domain if the value in the script is null. ### Environment data ```PowerShell Frontend Version Latest: 3.7.0 Current: 3.7.0 API Version Latest: 3.7.2 Current: 3.7.2 ```
kerem 2026-03-02 12:45:55 +03:00
Author
Owner

@github-actions[bot] commented on GitHub (Jul 10, 2023):

Thank you for creating a bug. Please make sure your bug is indeed a unique case by checking current and past issues, and reading the complete documentation at https://docs.cipp.app/
If your bug is a known documentation issue, it will be closed without notice by a contributor. To confirm that this is not a bug found in the documentation, please copy and paste the following comment: "I confirm that I have checked the documentation thoroughly and believe this to be an actual bug.".

Without confirming, your report will be closed in 24 hours. If you'd like this bug to be assigned to you, please comment "I would like to work on this please!".

<!-- gh-comment-id:1628873087 --> @github-actions[bot] commented on GitHub (Jul 10, 2023): Thank you for creating a bug. Please make sure your bug is indeed a unique case by checking current and past issues, and reading the complete documentation at https://docs.cipp.app/ If your bug is a known documentation issue, it will be closed without notice by a contributor. To confirm that this is not a bug found in the documentation, please copy and paste the following comment: "I confirm that I have checked the documentation thoroughly and believe this to be an actual bug.". Without confirming, your report will be closed in 24 hours. If you'd like this bug to be assigned to you, please comment "I would like to work on this please!".
Author
Owner

@MBstatsara commented on GitHub (Jul 10, 2023):

I would like to work on this please

<!-- gh-comment-id:1628873536 --> @MBstatsara commented on GitHub (Jul 10, 2023): I would like to work on this please
Author
Owner

@MBstatsara commented on GitHub (Jul 10, 2023):

Simply adding the last line to ExecMaintenanceScripts/Scripts/Add-CippUser.ps1
Fixes the problem

$swa = Get-AzStaticWebApp -ResourceGroupName $ResourceGroup
$Domain = $swa.CustomDomain | Select-Object -First 1
if ($Domain -eq $null){$Domain = $swa.DefaultHostname}

<!-- gh-comment-id:1628875415 --> @MBstatsara commented on GitHub (Jul 10, 2023): Simply adding the **last** line to ExecMaintenanceScripts/Scripts/Add-CippUser.ps1 Fixes the problem $swa = Get-AzStaticWebApp -ResourceGroupName $ResourceGroup $Domain = $swa.CustomDomain | Select-Object -First 1 if ($Domain -eq $null){$Domain = $swa.DefaultHostname}
Author
Owner

@MBstatsara commented on GitHub (Jul 10, 2023):

I would like to work on this please!

<!-- gh-comment-id:1629026017 --> @MBstatsara commented on GitHub (Jul 10, 2023): I would like to work on this please!
Author
Owner

@github-actions[bot] commented on GitHub (Jul 10, 2023):

Great! I assigned you (@MBstatsara) to the issue. Have fun working on it!

<!-- gh-comment-id:1629026336 --> @github-actions[bot] commented on GitHub (Jul 10, 2023): Great! I assigned you (@MBstatsara) to the issue. Have fun working on it!
Author
Owner

@MBstatsara commented on GitHub (Jul 10, 2023):

Also adding line
$SelectedUsers = $AllUsers | Where-Object { $CurrentUsers.DisplayName -notcontains $_.UserPrincipalName } | sort-Object -Property DisplayName | Out-ConsoleGridView -Title "Select users for role '$Role'"

sorts the name by users name instead of random orders and makes it much easier to add users.

<!-- gh-comment-id:1629028194 --> @MBstatsara commented on GitHub (Jul 10, 2023): Also adding line $SelectedUsers = $AllUsers | Where-Object { $CurrentUsers.DisplayName -notcontains $_.UserPrincipalName } | sort-Object -Property DisplayName | Out-ConsoleGridView -Title "Select users for role '$Role'" sorts the name by users name instead of random orders and makes it much easier to add users.
Author
Owner

@KelvinTegelaar commented on GitHub (Jul 19, 2023):

Fixed in dev. :)

<!-- gh-comment-id:1641833635 --> @KelvinTegelaar commented on GitHub (Jul 19, 2023): Fixed in dev. :)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/CIPP#871
No description provided.