Issue:
Unable to add new Org/Sandbox as it keeps loading on the Authentication page after entering the credentials.
Cause:
When attempting to add a new sandbox in the Environment Hub, the authentication process failed because the Salesforce orgs were configured with IP restrictions.
The error visible in the backend will be:
response from salesforce for authorization code: {'error': 'invalid_grant', 'error_description': 'ip restricted'}.
This prevented the Druva application from completing the OAuth authentication flow for the sandbox.
Resolution:
Navigate to affected org and whitelist the IP ranges shared by the support team in both locations.
Setup → Security → Network Access (You can also directly search for ‘Network Access’ in the ‘Quick Find’.
2. Setup → Profiles → Select the user's profile → Login IP Ranges.
Workaround:
Create a new profile without any IP restrictions or remove the IP restrictions from existing profiles to which the user belongs.
