Description
I’m querying users with licenses and specific date since they past logged in.
I need to know where/how I can include the additional string “action=delete” when invoking the DELETE method via Powershell. Since we have a managed domain, the default use of DELETE does not work since it tries to disassociate the account rather than delete.
Error
REST call threw exception: ({“code”:1107,“message”:“You can not disassociate a user with managed domain.”}.Exception)
Which App Type (OAuth / Chatbot / JWT / Webhook)?
JWT
Which Endpoint/s?
https://api.zoom.us/v2/users
Screenshots (If applicable)
Snippet of code below
`#this is just an excerpt of my overall script
#in this section, if I need to DELETE a user where can I add action=delete?
$global:usersToHaveTheLicenseRemoved | % {
$currentUserId = $.id
$params = @{
URI = “$zoomUsersEndpoint/$currentUserId”
Method = ‘DELETE’
Headers = @{ Authorization = “Bearer $OAuthToken”
‘Content-Type’ = ‘application/json’ }
}
try {
$global:response = Invoke-RestMethod @params
}
catch {
Write-Host "REST call threw exception: ($.Exception)"
$global:exc = $_
exit
}`.
Additional context
I just need to know how/where to include the action=delete string under this global.