Skip to content

Instantly share code, notes, and snippets.

@darrenjrobinson
Last active March 8, 2019 06:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save darrenjrobinson/5d7ac9c1758c1c561401c274104be99f to your computer and use it in GitHub Desktop.
Save darrenjrobinson/5d7ac9c1758c1c561401c274104be99f to your computer and use it in GitHub Desktop.
# IdentityNow Orgname
$orgname = "yourOrgName"
# Update Profile
$UpdateProfilesListBaseURI = "https://$($orgName).api.identitynow.com/v2/access-profiles"
# Access Profile ID
$profileid = $profile.id # where $profile is an Access Profile retrieved from Get Access Profiles
$updateAccessProfile = @{}
$updateAccessProfile.Add("requestCommentsRequired", $false)
$updateAccessProfile.Add("deniedCommentsRequired", $false)
$updateBody = $updateAccessProfile | convertto-json
$updateProfile = Invoke-RestMethod -method Patch -uri "$($UpdateProfilesListBaseURI)/$($profile.id)" -Headers @{Authorization = "$($v3Token.token_type) $($v3Token.access_token)"; "Content-Type" = "application/json"} -Body $updateBody
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment