We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a02dc01 + 7b72786 commit 7f74e80Copy full SHA for 7f74e80
Modules/CIPPCore/Public/Entrypoints/HTTP Functions/Teams-Sharepoint/Invoke-AddTeam.ps1
@@ -18,9 +18,11 @@ Function Invoke-AddTeam {
18
# Write to the Azure Functions log stream.
19
Write-Host 'PowerShell HTTP trigger function processed a request.'
20
21
- $Owners = ($userobj.owner).value
+ $Owners = ($userobj.owner)
22
try {
23
-
+ if ($null -eq $Owners) {
24
+ throw "You have to add at least one owner to the team"
25
+ }
26
$Owners = $Owners | ForEach-Object {
27
$OwnerID = "https://graph.microsoft.com/beta/users('$($_)')"
28
@{
0 commit comments