q="SELECT RiskType, Setting, SettingGroup, OrgValue, StandardValue FROM SecurityHealthCheckRisks"
[{"message":"sObject type 'SecurityHealthCheckRisks' is not supported.","errorCode":"INVALID_TYPE"}]
The User which I am using has all the needed permissions (View health Check, Manage Health Check, Setup, and Manage Configurations). Moreover, this user is a system admin.
The same code works locally with my developer instance but not on the production instance. I am using a connected App Access token to query the instance.
I verified using the developer console on production and the same query works there.