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:
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.
ConnectedApplication
, I can see there's a fieldOptionsIPRestrictions
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 APIOptionsIPRestrictions
slipped my radar, thank you for pointing it out! Strange that it's only aboolean
value when there are 4 picklist values to choose from within the UI, andSessionPolicyAction
is aPicklist(1)
type meaning those picklist values are just one char long, probably indicating these four options