diff --git a/.github/workflows/publish_production.yml b/.github/workflows/publish_production.yml index 301c8bb..417efaf 100644 --- a/.github/workflows/publish_production.yml +++ b/.github/workflows/publish_production.yml @@ -28,4 +28,4 @@ jobs: shell: pwsh run: | $ProgressPreference='SilentlyContinue' - Publish-Module -Path $env:GITHUB_WORKSPACE/Build/Output/ -NuGetApiKey $env:NUGET_APIKEY_PRODUCTION + Publish-Module -Path $env:GITHUB_WORKSPACE/Build/TeamViewerPS/ -NuGetApiKey $env:NUGET_APIKEY_PRODUCTION diff --git a/.gitignore b/.gitignore index 9585e52..38af4d9 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/Build/Output +/Build/TeamViewerPS diff --git a/Build/New-Package.ps1 b/Build/New-Package.ps1 index ceb2da3..68f1cfa 100644 --- a/Build/New-Package.ps1 +++ b/Build/New-Package.ps1 @@ -2,7 +2,7 @@ param( [Parameter()] - [string]$Build_OutputPath = "$(Resolve-Path "$PSScriptRoot\..")\Build\Output" + [string]$Build_OutputPath = "$(Resolve-Path "$PSScriptRoot\..")\Build\TeamViewerPS" ) $Repo_RootPath = Resolve-Path -Path "$PSScriptRoot\.." @@ -32,8 +32,9 @@ Write-Verbose "Found $($PublicFunctions.Count) public function files." # Create help from markdown Write-Verbose 'Building help from Markdown...' -New-ExternalHelp -Path (Join-Path -Path $Repo_RootPath -ChildPath 'Docs') -OutputPath (Join-Path -Path $Build_OutputPath -ChildPath 'en-US') | Out-Null New-ExternalHelp -Path (Join-Path -Path $Repo_RootPath -ChildPath 'Docs\Help') -OutputPath (Join-Path -Path $Build_OutputPath -ChildPath 'en-US') | Out-Null +Copy-Item -Path (Join-Path -Path $Repo_RootPath -ChildPath 'Docs\about_TeamViewerPS.md') -Destination (Join-Path -Path $Build_OutputPath -ChildPath 'en-US\TeamViewerPS.md') + # Create module manifest Write-Verbose 'Creating module manifest...' diff --git a/CHANGELOG.md b/CHANGELOG.md index 1eef9c3..ca3fb0d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,13 +11,14 @@ - Adds `Export-TeamViewerSystemInformation` to create zip file for support. - Adds `Set-TeamViewerPSProxy` and `Remove-TeamViewerPSProxy` to set proxy to access WebAPI. - Adds `Get-TeamViewerInstallationDirectory` to return installation directory. +- Adds `Get-TeamViewerCustomModuleId` to return custom module ID. +- Adds `Get-TeamViewerLogFilePath` to return log file paths for different logs present. - Adds `Remove-TeamViewerPolicyFromManagedDevice` to remove policies from managed devices. ### Changed - Extends `Invoke-TeamViewerPackageDownload` with MSI package type. - Removes `-RemovePolicy` switch from `Set-TeamViewerManagedDevice`. -- Removes `-Permissions` switch from `Get-TeamViewerUser`, `New-TeamViewerUser` and `Remove-TeamViewerUser`. - Modifies general module folder structure. ### Fixed diff --git a/Cmdlets/Private/ConvertTo-TeamViewerUser.ps1 b/Cmdlets/Private/ConvertTo-TeamViewerUser.ps1 index 653e492..5269bdd 100644 --- a/Cmdlets/Private/ConvertTo-TeamViewerUser.ps1 +++ b/Cmdlets/Private/ConvertTo-TeamViewerUser.ps1 @@ -23,6 +23,7 @@ function ConvertTo-TeamViewerUser { if ($PropertiesToLoad -Eq 'All') { $properties += @{ + Permissions = $InputObject.permissions -split ',' Active = $InputObject.active LastAccessDate = $InputObject.last_access_date | ConvertTo-DateTime } diff --git a/Cmdlets/Public/Get-TeamViewerUser.ps1 b/Cmdlets/Public/Get-TeamViewerUser.ps1 index c5d34cd..d611bfe 100644 --- a/Cmdlets/Public/Get-TeamViewerUser.ps1 +++ b/Cmdlets/Public/Get-TeamViewerUser.ps1 @@ -20,6 +20,10 @@ function Get-TeamViewerUser { [string[]] $Email, + [Parameter(ParameterSetName = "FilteredList")] + [string[]] + $Permissions, + [Parameter()] [ValidateSet('All', 'Minimal')] $PropertiesToLoad = 'All' @@ -28,9 +32,9 @@ function Get-TeamViewerUser { $parameters = @{ } switch ($PropertiesToLoad) { 'All' { - $parameters.full_list = $true + $parameters.full_list = $true } - 'Minimal' { + 'Minimal' { } } @@ -49,6 +53,9 @@ function Get-TeamViewerUser { if ($Email) { $parameters['email'] = ($Email -join ',') } + if ($Permissions) { + $parameters['permissions'] = ($Permissions -join ',') + } } } diff --git a/Cmdlets/Public/New-TeamViewerUser.ps1 b/Cmdlets/Public/New-TeamViewerUser.ps1 index ab1750d..f6a7ef6 100644 --- a/Cmdlets/Public/New-TeamViewerUser.ps1 +++ b/Cmdlets/Public/New-TeamViewerUser.ps1 @@ -28,6 +28,10 @@ function New-TeamViewerUser { [securestring] $SsoCustomerIdentifier, + [Parameter()] + [array] + $Permissions, + [Parameter()] [ValidateScript( { $_ | Resolve-TeamViewerLanguage } )] [cultureinfo] @@ -56,6 +60,7 @@ function New-TeamViewerUser { email = $Email name = $Name language = $Culture | Resolve-TeamViewerLanguage + permissions = $Permissions -join ',' } if ($Password -And -Not $WithoutPassword) { diff --git a/Cmdlets/Public/Set-TeamViewerUser.ps1 b/Cmdlets/Public/Set-TeamViewerUser.ps1 index dcda9d7..87454b0 100644 --- a/Cmdlets/Public/Set-TeamViewerUser.ps1 +++ b/Cmdlets/Public/Set-TeamViewerUser.ps1 @@ -34,6 +34,10 @@ function Set-TeamViewerUser { [securestring] $SsoCustomerIdentifier, + [Parameter(ParameterSetName = 'ByParameters')] + [array] + $Permissions, + [Parameter(Mandatory = $true, ParameterSetName = 'ByProperties')] [hashtable] $Property, @@ -73,6 +77,9 @@ function Set-TeamViewerUser { $body['sso_customer_id'] = [System.Runtime.InteropServices.Marshal]::PtrToStringBSTR($bstr) [System.Runtime.InteropServices.Marshal]::ZeroFreeBSTR($bstr) | Out-Null } + if ($Permissions) { + $body['permissions'] = $Permissions -join ',' + } if($AssignRoleId){ $body['assignUserRoleIds'] = @($AssignRoleId) } @@ -81,7 +88,9 @@ function Set-TeamViewerUser { } } 'ByProperties' { - @('active', 'email', 'name', 'password', 'sso_customer_id') | Where-Object { $Property[$_] } | ForEach-Object { $body[$_] = $Property[$_] } + @('active', 'email', 'name', 'password', 'sso_customer_id', 'permissions') | ` + Where-Object { $Property[$_] } | ` + ForEach-Object { $body[$_] = $Property[$_] } } } diff --git a/Docs/Help/Get-TeamViewerUser.md b/Docs/Help/Get-TeamViewerUser.md index ee439cf..162d76a 100644 --- a/Docs/Help/Get-TeamViewerUser.md +++ b/Docs/Help/Get-TeamViewerUser.md @@ -16,7 +16,8 @@ Retrieve users of a TeamViewer company. ### FilteredList (Default) ```powershell -Get-TeamViewerUser -ApiToken [-Name ] [-Email ] [-PropertiesToLoad ] [] +Get-TeamViewerUser -ApiToken [-Name ] [-Email ] [-Permissions ] + [-PropertiesToLoad ] [] ``` ### ByUserId @@ -123,6 +124,23 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Permissions + +Optional permissions filter that can be used to only list users that have +certain permissions. Multiple values can be given. + +```yaml +Type: String[] +Parameter Sets: FilteredList +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -PropertiesToLoad Can be used to retrieve all available properties of a user or just a stripped-down minimal set of user properties. diff --git a/Docs/Help/New-TeamViewerUser.md b/Docs/Help/New-TeamViewerUser.md index 1c7dd81..e792a68 100644 --- a/Docs/Help/New-TeamViewerUser.md +++ b/Docs/Help/New-TeamViewerUser.md @@ -17,14 +17,14 @@ Create a new TeamViewer company user. ```powershell New-TeamViewerUser -ApiToken -Email -Name -Password [-RoleId ][-IgnorePredefinedRole ] - [-SsoCustomerIdentifier ] [-Culture ] [-WhatIf] [-Confirm] [] + [-SsoCustomerIdentifier ][-Permissions ][-Culture ] [-WhatIf] [-Confirm] [] ``` ### WithoutPassword ```powershell New-TeamViewerUser -ApiToken -Email -Name [-WithoutPassword][-IgnorePredefinedRole ] - [-SsoCustomerIdentifier ] [-Culture ] [-WhatIf] [-Confirm] [] + [-SsoCustomerIdentifier ][-Permissions ][-Culture ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -157,6 +157,22 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Permissions + +Optional list of permissions to give to the new user. + +```yaml +Type: Array +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -SsoCustomerIdentifier Optional TeamViewer SSO customer identifier. If given, the user will be created diff --git a/Docs/Help/Set-TeamViewerUser.md b/Docs/Help/Set-TeamViewerUser.md index 083b7ee..94bc09d 100644 --- a/Docs/Help/Set-TeamViewerUser.md +++ b/Docs/Help/Set-TeamViewerUser.md @@ -17,7 +17,7 @@ Change properties of a TeamViewer company user. ```powershell Set-TeamViewerUser -ApiToken -User [-Active ] [-Email ][-AssignRoleId ][-UnassignRoleId ] - [-Name ] [-Password ] [-SsoCustomerIdentifier ] [-WhatIf] [-Confirm] [] + [-Name ] [-Password ] [-SsoCustomerIdentifier ] [-Permissions ] [-WhatIf] [-Confirm] [] ``` ### ByProperties @@ -173,6 +173,23 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -Permissions + +Updated set of permissions of the company user. +Please see the TeamViewer API documentation for a list of valid values. + +```yaml +Type: Array +Parameter Sets: ByParameters +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -AssignRoleId Role assigned to the user. @@ -209,7 +226,7 @@ Accept wildcard characters: False Change policy information using a hashtable object. Valid hashtable keys are: -`active`, `email`, `name`, `password`, `sso_customer_id` +`active`, `email`, `name`, `password`, `sso_customer_id`, `permissions` ```yaml Type: Hashtable diff --git a/Docs/about_TeamViewerPS.md b/Docs/about_TeamViewerPS.md new file mode 100644 index 0000000..fe0e802 --- /dev/null +++ b/Docs/about_TeamViewerPS.md @@ -0,0 +1,257 @@ +# TeamViewerPS + +# SHORT DESCRIPTION + +Interact with the TeamViewer Web API as well as a locally installed TeamViewer client. + +# LONG DESCRIPTION + +TeamViewerPS allows to interact with the TeamViewer Web API as well as a locally installed TeamViewer client. + +The module provides functions for the following categories: + +## Device Assignment + +Assign or unassign a device to a company + +The following functions are available in this category: + +[`Add-TeamViewerAssignment.md`](Help/Add-TeamViewerAssignment.md) + +[`Remove-TeamViewerAssignment.md`](Help/Remove-TeamViewerAssignment.md) + +## Customize Client + +Manage customization of the locally installed TeamViewer Client. + +[`Add-TeamViewerCustomization`](Help/Add-TeamViewerCustomization.md) + +[`Remove-TeamViewerCustomization`](Help/Remove-TeamViewerCustomization.md) + +## Computers & Contacts + +Remotely manage the Computers & Contacts via the TeamViewer Web API. + +The following functions are available in this category: + +[`Get-TeamViewerContact`](Help/Get-TeamViewerContact.md) + +[`Get-TeamViewerDevice`](Help/Get-TeamViewerDevice.md) + +[`Get-TeamViewerGroup`](Help/Get-TeamViewerGroup.md) + +[`New-TeamViewerContact`](Help/New-TeamViewerContact.md) + +[`New-TeamViewerDevice`](Help/New-TeamViewerDevice.md) + +[`New-TeamViewerGroup`](Help/New-TeamViewerGroup.md) + +[`Remove-TeamViewerContact`](Help/Remove-TeamViewerContact.md) + +[`Remove-TeamViewerDevice`](Help/Remove-TeamViewerDevice.md) + +[`Remove-TeamViewerGroup`](Help/Remove-TeamViewerGroup.md) + +[`Set-TeamViewerDevice`](Help/Set-TeamViewerDevice.md) + +[`Set-TeamViewerGroup`](Help/Set-TeamViewerGroup.md) + +[`Publish-TeamViewerGroup`](Help/Publish-TeamViewerGroup.md) + +[`Unpublish-TeamViewerGroup`](Help/Unpublish-TeamViewerGroup.md) + +## User Management + +Remotely manage the user accounts of a TeamViewer company via the TeamViewer +Web API. + +The following functions are available in this category: + +[`Get-TeamViewerUser`](Help/Get-TeamViewerUser.md) + +[`New-TeamViewerUser`](Help/New-TeamViewerUser.md) + +[`Remove-TeamViewerUser`](Help/Remove-TeamViewerUser.md) + +[`Set-TeamViewerUser`](Help/Set-TeamViewerUser.md) + +## User Groups + +Remotely manage the user groups of a TeamViewer company via the +TeamViewer Web API. Have user groups to organize company members. + +The following functions are available in this category: + +[`Get-TeamViewerUserGroup`](Help/Get-TeamViewerUserGroup.md) + +[`New-TeamViewerUserGroup`](Help/New-TeamViewerUserGroup.md) + +[`Set-TeamViewerUserGroup`](Help/Set-TeamViewerUserGroup.md) + +[`Remove-TeamViewerUserGroup`](Help/Remove-TeamViewerUserGroup.md) + +[`Get-TeamViewerUserGroupMember`](Help/Get-TeamViewerUserGroupMember.md) + +[`Add-TeamViewerUserGroupMember`](Help/Add-TeamViewerUserGroupMember.md) + +[`Remove-TeamViewerUserGroupMember`](Help/Remove-TeamViewerUserGroupMember.md) + +## Roles + +Remotely manage the roles of a TeamViewer company via the +TeamViewer Web API. Have roles to assign permissions to company users. + +The following functions are available in this category: + +[`Get-TeamViewerRole`](Help/Get-TeamViewerRole.md) + +[`New-TeamViewerRole`](Help/New-TeamViewerRole.md) + +[`Set-TeamViewerRole`](Help/Set-TeamViewerRole.md) + +[`Remove-TeamViewerRole`](Help/Remove-TeamViewerRole.md) + +[`Get-TeamViewerUserByRole`](Help/Get-TeamViewerUserByRole.md) + +[`Get-TeamViewerUserGroupByRole`](Help/Get-TeamViewerUserGroupByRole.md) + +[`Add-TeamViewerUserToRole`](Help/Add-TeamViewerUserToRole.md) + +[`Add-TeamViewerUserGroupToRole`](Help/Add-TeamViewerUserGroupToRole.md) + +[`Remove-TeamViewerUserFromRole`](Help/Remove-TeamViewerUserFromRole.md) + +[`Remove-TeamViewerUserGroupFromRole`](Help/Remove-TeamViewerUserGroupFromRole.md) + +## Managed Groups & Managed Devices + +Remotely manage the managed groups and managed devices of an account via the TeamViewer Web API. + +The following functions are available in this category: + +[`Get-TeamViewerManagedDevice`](Help/Get-TeamViewerManagedDevice.md) + +[`Get-TeamViewerManagedGroup`](Help/Get-TeamViewerManagedGroup.md) + +[`Get-TeamViewerManagementId`](Help/Get-TeamViewerManagementId.md) + +[`Get-TeamViewerManager`](Help/Get-TeamViewerManager.md) + +[`New-TeamViewerManagedGroup`](Help/New-TeamViewerManagedGroup.md) + +[`Set-TeamViewerManagedDevice`](Help/Set-TeamViewerManagedDevice.md) + +[`Set-TeamViewerManagedGroup`](Help/Set-TeamViewerManagedGroup.md) + +[`Set-TeamViewerManager`](Help/Set-TeamViewerManager.md) + +[`Add-TeamViewerManagedDevice`](Help/Add-TeamViewerManagedDevice.md) + +[`Add-TeamViewerManager`](Help/Add-TeamViewerManager.md) + +[`Remove-TeamViewerManagedDevice`](Help/Remove-TeamViewerManagedDevice.md) + +[`Remove-TeamViewerManagedDeviceManagement`](Help/Remove-TeamViewerManagedDeviceManagement.md) + +[`Remove-TeamViewerManagedGroup`](Help/Remove-TeamViewerManagedGroup.md) + +[`Remove-TeamViewerManager`](Help/Remove-TeamViewerManager.md) + +[`Remove-TeamViewerPolicyFromManagedDevice`](Cmdlets/Pulic/Remove-TeamViewerPolicyFromManagedDevice.md) + +## Policy Management + +Remotely manage the policies of a TeamViewer company via the TeamViewer Web API. + +The following functions are available in this category: + +[`Get-TeamViewerPolicy`](Help/Get-TeamViewerPolicy.md) + +[`New-TeamViewerPolicy`](Help/New-TeamViewerPolicy.md) + +[`Remove-TeamViewerPolicy`](Help/Remove-TeamViewerPolicy.md) + +[`Set-TeamViewerPolicy`](Help/Set-TeamViewerPolicy.md) + +## Single Sign-On (SSO) Management + +Remotely manage Single Sign-On configurations via the TeamViewer Web API. + +The following functions are available in this category: + +[`Get-TeamViewerSsoDomain`](Help/Get-TeamViewerSsoDomain.md) + +[`Get-TeamViewerSsoExclusion`](Help/Get-TeamViewerSsoExclusion.md) + +[`Add-TeamViewerSsoExclusion`](Help/Add-TeamViewerSsoExclusion.md) + +[`Remove-TeamViewerSsoExclusion`](Help/Remove-TeamViewerSsoExclusion.md) + +## Event Logs & Reporting + +Retrieve event log entries or connection-reports of a TeamViewer company via the TeamViewer Web +API. + +[`Get-TeamViewerConnectionReport`](Help/Get-TeamViewerConnectionReport.md) + +[`Get-TeamViewerEventLog`](Help/Get-TeamViewerEventLog.md) + +## Local Client Utilities + +Utilities that help managing the local TeamViewer client. + +The following functions are available in this category: + +[`Export-TeamViewerSystemInformation`](Help/Export-TeamViewerSystemInformation.md) + +[`Get-TeamViewerId`](Help/Get-TeamViewerId.md) + +[`Get-TeamViewerService`](Help/Get-TeamViewerService.md) + +[`Get-TeamViewerVersion`](Help/Get-TeamViewerVersion.md) + +[`Get-TeamViewerInstallationDirectory`](Help/Get-TeamViewerInstallationDirectory.md) + +[`Get-TeamViewerLogFilePath`](Help/Get-TeamViewerLogFilePath.md) + +[`Invoke-TeamViewerPackageDownload`](Help/Invoke-TeamViewerPackageDownload.md) + +[`Restart-TeamViewerService`](Help/Restart-TeamViewerService.md) + +[`Start-TeamViewerService`](Help/Start-TeamViewerService.md) + +[`Stop-TeamViewerService`](Help/Stop-TeamViewerService.md) + +[`Test-TeamViewerConnectivity`](Help/Test-TeamViewerConnectivity.md) + +[`Test-TeamViewerInstallation`](Help/Test-TeamViewerInstallation.md) + +## Web API Utilities + +Utilities that help working with the TeamViewer Web API related functions. + +The following functions are available in this category: + +[`Connect-TeamViewerApi`](Help/Connect-TeamViewerApi.md) + +[`Disconnect-TeamViewerApi`](Help/Disconnect-TeamViewerApi.md) + +[`Invoke-TeamViewerPing`](Help/Invoke-TeamViewerPing.md) + +## Web API proxy + +Functions that manage proxy when working with TeamViewer Web API related functions. + +The following functions are available in this category: + +[`Set-TeamViewerPSProxy`](Help/Set-TeamViewerPSProxy.md) + +[`Remove-TeamViewerPSProxy`](Help/Remove-TeamViewerPSProxy.md) + +# SEE ALSO + +TeamViewerPS project page on Github: + +TeamViewer Web API Documentation: + +TeamViewer Homepage: diff --git a/Tests/Public/Get-TeamViewerUser.Tests.ps1 b/Tests/Public/Get-TeamViewerUser.Tests.ps1 index 0ceb008..56cb093 100644 --- a/Tests/Public/Get-TeamViewerUser.Tests.ps1 +++ b/Tests/Public/Get-TeamViewerUser.Tests.ps1 @@ -52,6 +52,12 @@ Describe 'Get-TeamViewerUser' { $Body -And $Body['email'] -eq 'user1@unit.test,user2@unit.test' } } + It 'Should allow to filter by permissions' { + Get-TeamViewerUser -ApiToken $testApiToken -Permissions 'p1', 'p2', 'p3' + Assert-MockCalled Invoke-TeamViewerRestMethod -Times 1 -Scope It -ParameterFilter { + $Body -And $Body['permissions'] -eq 'p1,p2,p3' } + } + It 'Should allow to retrieve all properties' { Get-TeamViewerUser -ApiToken $testApiToken -PropertiesToLoad 'All' diff --git a/Tests/Public/Set-TeamViewerUser.Tests.ps1 b/Tests/Public/Set-TeamViewerUser.Tests.ps1 index b652c34..aee71a8 100644 --- a/Tests/Public/Set-TeamViewerUser.Tests.ps1 +++ b/Tests/Public/Set-TeamViewerUser.Tests.ps1 @@ -33,7 +33,15 @@ Describe 'Set-TeamViewerUser' { $testPassword = 'Test1234' | ConvertTo-TestPassword $testSsoCustomerId = 'SsoTest' | ConvertTo-TestPassword - Set-TeamViewerUser -ApiToken $testApiToken -User 'u1234' -Name 'Updated User Name' -Email 'foo@bar.com' -Password $testPassword -SsoCustomerIdentifier $testSsoCustomerId -Active $false + Set-TeamViewerUser ` + -ApiToken $testApiToken ` + -User 'u1234' ` + -Name 'Updated User Name' ` + -Email 'foo@bar.com' ` + -Password $testPassword ` + -SsoCustomerIdentifier $testSsoCustomerId ` + -Permissions 'ManageAdmins', 'ManageUsers' ` + -Active $false $mockArgs.Body | Should -Not -BeNullOrEmpty $body = [System.Text.Encoding]::UTF8.GetString($mockArgs.Body) | ConvertFrom-Json @@ -41,15 +49,20 @@ Describe 'Set-TeamViewerUser' { $body.email | Should -Be 'foo@bar.com' $body.password | Should -Be 'Test1234' $body.sso_customer_id | Should -Be 'SsoTest' + $body.permissions | Should -Be 'ManageAdmins,ManageUsers' $body.active | Should -BeFalse } It 'Should accept user properties as hashtable' { - Set-TeamViewerUser -ApiToken $testApiToken -User 'u1234' -Property @{ + Set-TeamViewerUser ` + -ApiToken $testApiToken ` + -User 'u1234' ` + -Property @{ name = 'Updated User Name' email = 'foo@bar.com' password = 'Test1234' sso_customer_id = 'SsoTest' + permissions = 'ManageAdmins,ManageUsers' active = $false } @@ -59,6 +72,7 @@ Describe 'Set-TeamViewerUser' { $body.email | Should -Be 'foo@bar.com' $body.password | Should -Be 'Test1234' $body.sso_customer_id | Should -Be 'SsoTest' + $body.permissions | Should -Be 'ManageAdmins,ManageUsers' $body.active | Should -BeFalse }