Reputation: 73
How to retrive the SecuritySettings of the organization in Salesforce. There is a metaDataAPI available, but it uses soap for retriving. I need to retrive the SecuritySettings using Oauth 2.0 RestAPI or SOQL
Upvotes: 0
Views: 119
Reputation: 19637
Use Tooling API.
SecuritySettings
doesn't show up on the list in documentation but GET /services/data/v54.0/tooling/sobjects/SecuritySettings/describe
looks very promising. And from there you can query it or deploy/retrieve or whatever you want, it's similar to Metadata API.
/services/data/v54.0/tooling/query?q=SELECT Id, DurableId, Metadata, FullName, IsAuditFieldsInactiveOwnerEnabled, NetworkAccessId, IsRequireHttpsConnectionEnabled, SingleSignOnSettingsId, CanUsersGrantLoginAccess, IsAuraSecureEvalPrefEnabled, IsAdminLoginAsAnyUserEnabled, PasswordPoliciesId, SessionSettingsId FROM SecuritySettings
Upvotes: 1