SecurityHealthCheckRisks

Represents your org’s security setting values, risks, and Salesforce-recommended setting values. Only users with the “View Setup and Configuration” user permission can retrieve data from this object.

Version 

Introduced in API version 37.0.

Supported SOAP API Calls 

describeSObjects(), query()

Supported REST API Methods 

Query

Fields 

DurableId 

  • Type: string

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Description: Unique identifier for the field. Always retrieve this value before using it, as the value isn’t guaranteed to stay the same from one release to the next. To simplify queries, use this field.

OrgValue 

  • Type: string

  • Required: No

  • Properties: Filter, Nillable, Sort

  • Description: The org’s value for the security setting.

OrgValueRaw 

  • Type: string

  • Required: No

  • Properties: Filter, Nillable, Sort

  • Introduced: API version 38.0

  • Description: The org’s value for the security setting as it is stored in the database, usually without units of measure or extra text. For example, if the Minimum Password Length setting’s OrgValue is 8 characters, the OrgValueRaw is 8.

RiskType 

  • Type: picklist

  • Required: No

  • Properties: Filter, Group, Nillable, Restricted picklist, Sort

  • Description: The level of risk of the org’s security setting value.

  • Possible values:

    • HIGH_RISK — HIGH_RISK

    • MEDIUM_RISK — MEDIUM_RISK

    • MEETS_STANDARD — MEETS_STANDARD

SecurityHealthCheckId 

  • Type: string

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Description: The ID of the Health Check score record associated with this field.

Setting 

  • Type: string

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Description: The name of the security setting. For example, Minimum password length.

SettingGroup 

  • Type: string

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Description: The name of the security setting group in which the setting resides in the Setup tree. For example, Password Policies.

SettingRiskCategory 

  • Type: picklist

  • Required: No

  • Properties: Filter, Group, Nillable, Restricted picklist, Sort

  • Introduced: API version 40.0

  • Description: The level of risk of the org’s security settings. Available in version 40.0 and later.

  • Possible values:

    • HIGH_RISK — HIGH_RISK

    • MEDIUM_RISK — MEDIUM_RISK

    • LOW_RISK — LOW_RISK

    • INFORMATIONAL — INFORMATIONAL

StandardValue 

  • Type: string

  • Required: No

  • Properties: Filter, Nillable, Sort

  • Description: Salesforce-recommended standard value for the security setting.

StandardValueRaw 

  • Type: string

  • Required: No

  • Properties: Filter, Nillable, Sort

  • Introduced: API version 38.0

  • Description: Salesforce-recommended standard value for the security setting as it is stored in the database, usually without units of measure or extra text. For example, if the Minimum Password Length setting’s StandardValue is 8 characters, the StandardValueRaw is 8.

Usage 

Use this object to query your org’s security setting values, risks, and Salesforce-recommended setting values. Reading security settings and their security status is useful if you have multiple Salesforce applications that require consistency and compliance in their security posture.

This query gets a list of your org’s high risk settings.

1SELECT RiskType, Setting, SettingGroup, OrgValue, StandardValue FROM SecurityHealthCheckRisks where RiskType=’HIGH_RISK’

This query gets your org’s Health Check score and a list of your org’s high risk settings.

1SELECT Score, (SELECT RiskType, Setting, SettingGroup, OrgValue, StandardValue FROM SecurityHealthCheckRisks where RiskType=’HIGH_RISK’) FROM SecurityHealthCheck

This query gets your org’s Health Check score and the security settings that meet the Salesforce baseline standard.

1SELECT Score, (SELECT RiskType, Setting, SettingGroup, OrgValue, StandardValue FROM SecurityHealthCheckRisks where RiskType=’MEETS_STANDARD’) FROM SecurityHealthCheck

This query lists all the values in the Salesforce baseline standard.

1SELECT Setting, SettingGroup, StandardValue FROM SecurityHealthCheckRisks

DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!