Within a connected app's manage settings page (Setup -> Managed Connected Apps, click on the Edit link next to the connected app of interest), you can see and set the OAuth Policies -> IP Relaxation settings:

OAuth Policies -> IP Relaxation picklist values

I've been digging around different Metadata Types, like ConnectedApp and could use the MetadataService API to read that information. This ConnectedApp seems to show you nearly all connected app attributes except for this IP Relaxation setting.

Am I missing something here? Is there a different Metadata Type that contains this information? Or is there an existing object that we can SOQL into to see the current settings?

I know you can SOQL into ConnectedApplication and the OptionsAllowAdminApprovedUsersOnly field will tell you if the Permitted Users is set to "Admin Approved" (i.e. same as Metadata Type ConnectedApp.isAdminApproved), but I can't seem to find those IP Relaxation settings.

Note: I am trying to read this IP Relaxation setting in a subscriber org's managed package connected app.

  • Using the Salesforce Inspector Chrome extension and just looking throughConnectedApplication, I can see there's a field OptionsIPRestrictions and some other fields (SessionPolicyAction) that are greyed out (no details available) that I assume would contain what you're looking for. However, it doesn't appear to be something you can pull through the API Mar 1, 2020 at 17:25
  • @KrisGoncalves That OptionsIPRestrictions slipped my radar, thank you for pointing it out! Strange that it's only a boolean value when there are 4 picklist values to choose from within the UI, and SessionPolicyAction is a Picklist(1) type meaning those picklist values are just one char long, probably indicating these four options Mar 1, 2020 at 18:29

1 Answer 1


I'd have to double check but it seems likely that this field corresponds to "ipRelaxation" under the "ConnectedAppOauthPolicy" category. https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_connectedapp.htm

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.