This API worked fine in 1.3.1 but since upgrading to 1.4.2 it returns this error (even though all the tasks complete successfully in the API)
The property ‘UserName’ cannot be found on this object. Verify that the property exists.
I’ve verified my code and am not using “UserName” in it anywhere… any thoughts on why this is being returned after the upgrade?
this is the code for the api:
import-module pszoom
function updateZoom($accountToChange, $newEmail){
try{
Update-ZoomUserEmail $accountToChange -Email $newEmail -ApiKey $api_key -ApiSecret $api_secret
}
catch{
"Couldn’t update in Zoom: " + $accountToChange.ZoomEmailAddress | out-file log -append
_.ErrorDetails.ToString() | out-file $log -append
}
}
#BEGIN SCRIPT#
updateZoom $currentZoomEmail $newZoomEmail
This is the code i’m using to call it…
Invoke-RestMethod “https://psu.ourserver.com/zoomRename/currentemail@ourdomain.com/newemail@ourdomain.com” -Method POST -Headers @{ Authorization = “Bearer $zoomRenameToken”} -ContentType ‘application/json’
Thanks in advance…