Last active
December 5, 2018 22:10
-
-
Save darrenjrobinson/9a5b899261db80814741e3e697a10c0e to your computer and use it in GitHub Desktop.
Remove the visibility of IdentityNow Applications from users. Associated Blog Post can be found here https://blog.darrenjrobinson.com/managing-sailpoint-identitynow-applications-via-api-with-powershell/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$time = [int][double]::Parse((Get-Date -UFormat %s)) | |
$appListURI = "https://$($orgName).api.identitynow.com/cc/api/app/list?filter=org&_dc=$($time)" | |
$appList = Invoke-RestMethod -Uri $appListURI -Method Get -WebSession $IDN | |
$appUpdateURI = "https://$($orgName).api.identitynow.com/cc/api/app/update" | |
# Turn off App Visibility in Request Centre | |
$appBody = @{ | |
"launchpadEnabled" = $false ; | |
"provisionRequestEnabled" = $false ; | |
"appCenterEnabled" = $false | |
} | |
$body = $appBody | ConvertTo-Json | |
if ($appList) { | |
foreach ($app in $appList) { | |
write-host -ForegroundColor Green "Disabling App: $($app.name)" | |
try { | |
$updateResponse = Invoke-RestMethod -Uri "$($appUpdateURI)/$($app.id)" -Method POST -Body $body -WebSession $IDN | |
} | |
catch { | |
write-host -ForegroundColor Red "Failed to update app $($app.name)" | |
} | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment