@@ -159,7 +159,7 @@ http://darrenjrobinson.com/sailpoint-identitynow
159
159
if ($IdentityNowConfiguration.AdminCredential -and $IdentityNowConfiguration.AdminCredential.UserName -and $IdentityNowConfiguration.AdminCredential.Password ) {
160
160
# IdentityNow Admin User
161
161
$adminUSR = [string ]$IdentityNowConfiguration.AdminCredential.UserName.ToLower ()
162
- $adminPWDClear = [System.Runtime.InteropServices.marshal ]::PtrToStringAuto ([System.Runtime.InteropServices.marshal ]::SecureStringToBSTR($IdentityNowConfiguration.AdminCredential.Password ))
162
+ $adminPWDClear = [System.Runtime.InteropServices.marshal ]::PtrToStringBSTR ([System.Runtime.InteropServices.marshal ]::SecureStringToBSTR($IdentityNowConfiguration.AdminCredential.Password ))
163
163
164
164
# Generate the account hash
165
165
$hashUser = Get-HashString $adminUSR.ToLower ()
@@ -170,7 +170,7 @@ http://darrenjrobinson.com/sailpoint-identitynow
170
170
}
171
171
172
172
if ($IdentityNowConfiguration.v3 -and $IdentityNowConfiguration.v3.Username -and $IdentityNowConfiguration.v3.Password ) {
173
- $clientSecretv3 = [System.Runtime.InteropServices.marshal ]::PtrToStringAuto ([System.Runtime.InteropServices.marshal ]::SecureStringToBSTR($IdentityNowConfiguration.v3.Password ))
173
+ $clientSecretv3 = [System.Runtime.InteropServices.marshal ]::PtrToStringBSTR ([System.Runtime.InteropServices.marshal ]::SecureStringToBSTR($IdentityNowConfiguration.v3.Password ))
174
174
# Basic Auth
175
175
$Bytesv3 = [System.Text.Encoding ]::utf8.GetBytes(" $ ( $IdentityNowConfiguration.v3.UserName ) :$ ( $clientSecretv3 ) " )
176
176
$encodedAuthv3 = [Convert ]::ToBase64String($Bytesv3 )
@@ -212,7 +212,7 @@ http://darrenjrobinson.com/sailpoint-identitynow
212
212
}
213
213
elseif ($oAuthTokenBody.client_id -eq $IdentityNowConfiguration.PAT.UserName ) {
214
214
Write-Verbose " AuthType: Personal Access Token"
215
- $oAuthTokenBody.client_secret = [System.Runtime.InteropServices.marshal ]::PtrToStringAuto ([System.Runtime.InteropServices.marshal ]::SecureStringToBSTR($IdentityNowConfiguration.PAT.Password ))
215
+ $oAuthTokenBody.client_secret = [System.Runtime.InteropServices.marshal ]::PtrToStringBSTR ([System.Runtime.InteropServices.marshal ]::SecureStringToBSTR($IdentityNowConfiguration.PAT.Password ))
216
216
}
217
217
}
218
218
}
@@ -221,7 +221,7 @@ http://darrenjrobinson.com/sailpoint-identitynow
221
221
$oAuthTokenBody = @ {
222
222
grant_type = " client_credentials"
223
223
client_id = $IdentityNowConfiguration.PAT.UserName
224
- client_secret = [System.Runtime.InteropServices.marshal ]::PtrToStringAuto ([System.Runtime.InteropServices.marshal ]::SecureStringToBSTR($IdentityNowConfiguration.PAT.Password ))
224
+ client_secret = [System.Runtime.InteropServices.marshal ]::PtrToStringBSTR ([System.Runtime.InteropServices.marshal ]::SecureStringToBSTR($IdentityNowConfiguration.PAT.Password ))
225
225
}
226
226
}
227
227
else {
@@ -261,7 +261,7 @@ http://darrenjrobinson.com/sailpoint-identitynow
261
261
# v2 Auth
262
262
# Check to see if v2 API Client exists before generating v2 Headers
263
263
if ($IdentityNowConfiguration.v2 ) {
264
- $clientSecretv2 = [System.Runtime.InteropServices.marshal ]::PtrToStringAuto ([System.Runtime.InteropServices.marshal ]::SecureStringToBSTR($IdentityNowConfiguration.v2.Password ))
264
+ $clientSecretv2 = [System.Runtime.InteropServices.marshal ]::PtrToStringBSTR ([System.Runtime.InteropServices.marshal ]::SecureStringToBSTR($IdentityNowConfiguration.v2.Password ))
265
265
$Bytes = [System.Text.Encoding ]::utf8.GetBytes(" $ ( $IdentityNowConfiguration.v2.UserName ) :$ ( $clientSecretv2 ) " )
266
266
$encodedAuth = [Convert ]::ToBase64String($Bytes )
267
267
Write-Verbose " AuthType: v2 Basic Auth"
0 commit comments