• Ben Horley
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
Hello all

We have a requirement to add 70 or so IP addresses to a profile whitelist.

I was able to retrieve the profile using Ant retrieve and, looking at the metadata, you can see the IP's specified in the whitelist. I want to add IP's while keeping the existing ones intact instead of having to get the existing ones, merge them with the new ones then upload the lot.

I was not able to find this documented anywhere but it seemed logical that you could update a profile without having to upload the entire profile so I tried the following.

Package

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>*</members>
        <name>Profile</name>
    </types>
    <version>47.0</version>
</Package>

Profile

<?xml version="1.0" encoding="UTF-8"?>
<Profile xmlns="http://soap.sforce.com/2006/04/metadata">
    <loginIpRanges>
        <description>Azure IP</description>
        <startAddress>185.194.40.60</startAddress>
        <endAddress>185.194.40.61</endAddress>
    </loginIpRanges>
</Profile>

This sucessfully added that IP to the profile whitelist but wiped out what was already there. Do you know how I can append to the list instead of replacing it?

Cheers, Ben