<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Programmatically Adding Users and Groups to an API App Integration in Network Security Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/network-security-discussions/programmatically-adding-users-and-groups-to-an-api-app/m-p/1420945#M908</link>
    <description>Thanks Edfora very detailed response. Venafi should give you a prize for cracking their obfuscation on this. Great work and much appreciated. Darren</description>
    <pubDate>Wed, 27 Sep 2023 01:14:55 GMT</pubDate>
    <dc:creator>CyberArkAlumni</dc:creator>
    <dc:date>2023-09-27T01:14:55Z</dc:date>
    <item>
      <title>Programmatically Adding Users and Groups to an API App Integration</title>
      <link>https://live.paloaltonetworks.com/t5/network-security-discussions/programmatically-adding-users-and-groups-to-an-api-app/m-p/1420943#M906</link>
      <description>We would like to share a mechanism we developed for programmatically granting OAuth rights to groups and users. This requirement is related to this post on the Ideas forum. This does solve that need.This solution does not change the scopes on an integration. However, it does allow for programmatic modification of the users and groups that have access to an integration.Note that the API calls below must be performed by an identity in the authentication tree being modified.AssumptionsAn app integration exists with appropriate scopes (TargetApp)	An administrative app exists for routine API work (AdminApp)	No local users or groups currently exist for this requirement	A csv file with the field ADObjects contains the listing of users/groups to add	You have RSAT installedManual Set UpVia the UI, create a local group (TargetAppLocalGroup)	Via the UI, create a local user (LocalApiUser) with Master Admin rights	In Aperture,add TargetAppLocalGrouptoTargetApp	In Aperture, add LocalApiUser to AdminAppAPI Calls UsedAuthorize/Integrated (or equivalent) asLocalApiUser to client_idAdminApp	Identity/Browse to retrieveTargetAppLocalGroup	Get-ADUSerfor new member user GUID	Get-ADGroup for new member group GUID	Identity/Validate to verify Venafi can find new member user or group	Identity/AddGroupMembers to add user or groupCode Sample$AppIntg = "TargetAppLocalGroup"$BrowseResponse = Identity/Browse -Filter $AppIntg -Limit 1 -IdentityType 2$TargetGroup = @{PrefixedUniversal="$($BrowseResponse.Identities[0].PrefixedUniversal)"}Import-Csv $InputdataFile |%{ 	$GetADResponse = Get-ADGroup $_.ADObjects # or Get-ADUser as appropriate)	$Identity = ConvertTo-VFIdentity -ObjectGUID $GetADResponse.ObjectGUID.Guid -Domain "AD+Your Domain"	$ID = @{PrefixedUniversal="$($Identity.Identity)"}	$ValidateResponse = Identity/Validate -ID $ID	$Member = @(  @{PrefixedUniversal="$($ValidateResponse.ID.PrefixedUniversal)"} )	$AddMembersResponse = Identity/AddGroupMembers -Group $Group -Members $Member -ShowMembers $True}NotesError checking and Try/Catches omitted for clarity	ConvertTo-VFIdentity is a utility we wrote that converts AD GUIDs to Venafi AD Identity strings.</description>
      <pubDate>Wed, 03 Nov 2021 15:18:16 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/network-security-discussions/programmatically-adding-users-and-groups-to-an-api-app/m-p/1420943#M906</guid>
      <dc:creator>Ed_Hart</dc:creator>
      <dc:date>2021-11-03T15:18:16Z</dc:date>
    </item>
    <item>
      <title>Re: Programmatically Adding Users and Groups to an API App Integration</title>
      <link>https://live.paloaltonetworks.com/t5/network-security-discussions/programmatically-adding-users-and-groups-to-an-api-app/m-p/1420944#M907</link>
      <description>Hi Ed, That is a very similar problem that we are trying to solve. Would you be able to share yourConvertTo-VFIdentity code here? Thanks Darren Davis</description>
      <pubDate>Tue, 26 Sep 2023 02:30:06 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/network-security-discussions/programmatically-adding-users-and-groups-to-an-api-app/m-p/1420944#M907</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2023-09-26T02:30:06Z</dc:date>
    </item>
    <item>
      <title>Re: Programmatically Adding Users and Groups to an API App Integration</title>
      <link>https://live.paloaltonetworks.com/t5/network-security-discussions/programmatically-adding-users-and-groups-to-an-api-app/m-p/1420945#M908</link>
      <description>Thanks Edfora very detailed response. Venafi should give you a prize for cracking their obfuscation on this. Great work and much appreciated. Darren</description>
      <pubDate>Wed, 27 Sep 2023 01:14:55 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/network-security-discussions/programmatically-adding-users-and-groups-to-an-api-app/m-p/1420945#M908</guid>
      <dc:creator>CyberArkAlumni</dc:creator>
      <dc:date>2023-09-27T01:14:55Z</dc:date>
    </item>
  </channel>
</rss>

