From e9d91e9899422b557a21d33d98e75e519fef419e Mon Sep 17 00:00:00 2001 From: garrett-wood <47695679+garrett-wood@users.noreply.github.com> Date: Tue, 14 Mar 2023 15:04:15 -0400 Subject: [PATCH] Added support for GCCH Tenants Extended validation script for Invoke-MCASRestMethod to also support GCC High tenants --- Functions/Invoke-MCASRestMethod.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Functions/Invoke-MCASRestMethod.ps1 b/Functions/Invoke-MCASRestMethod.ps1 index 43c4969..81b2021 100644 --- a/Functions/Invoke-MCASRestMethod.ps1 +++ b/Functions/Invoke-MCASRestMethod.ps1 @@ -1,11 +1,11 @@ function Invoke-MCASRestMethod { [CmdletBinding()] param ( - # Specifies the credential object containing tenant as username (e.g. 'contoso.us.portal.cloudappsecurity.com') and the 64-character hexadecimal Oauth token as the password. + # Specifies the credential object containing tenant as username (e.g. 'contoso.us.portal.cloudappsecurity.com' for Commercial) and the 64-character hexadecimal Oauth token as the password. [Parameter(Mandatory = $true)] [ValidateNotNullOrEmpty()] [ValidateScript( { - ($_.GetNetworkCredential().username).EndsWith('.portal.cloudappsecurity.com') + ($_.GetNetworkCredential().username).EndsWith('.portal.cloudappsecurity.com') -or ($_.GetNetworkCredential().username).EndsWith('.portal.cloudappsecurity.us') })] [ValidateScript( { $_.GetNetworkCredential().Password -match ($MCAS_TOKEN_VALIDATION_PATTERN) @@ -181,4 +181,4 @@ #Write-Information $recordTotal } $response -} \ No newline at end of file +}