I have a long list of login IP ranges for all the profiles. Is there any easy way to deploy these. Right now we are doing it manually.
2 Answers
There is an idea to Import of profile IP Ranges.Workaround is here from @sfdcfox
Use the Metadata API Toolkit.
First, install the tool (see Setup > Develop > Tools).
Second, create a new directory to work from, build a build.xml file (see samples in the toolkit file).
You'll need a retrieve.xml file (whatever you choose to name it) that looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>*</members>
<name>Profile</name>
</types>
<version>30.0</version>
</Package>
Run sf:retrieve against this XML file, and you'll end up with results like this:
src/package.xml
src/profiles/Admin.profile
src/profiles/Content Only User.profile
src/profiles/ContractManager.profile
(more profiles)
Next, edit each profile file, adding in loginIpRanges:
<loginIpRanges>
<endAddress>x.x.x.x</endAddress>
<startAddress>y.y.y.y</startAddress>
</loginIpRanges>
You can copy and paste them between each profile, if need be.
Finally, run sf:deploy using deployRoot="src" (if that is what the original retrieve used) to instantly upload all IP ranges to all profiles in one step.
You can do the same thing with the Force.com IDE if you don't like command prompts.
I've noticed that you can deploy these by selecting the profile that you want to deploy the login IP ranges for, and picking a dummy object to deploy (like a custom field).