Current State of Account Settings using an API

Hello Everyone,

I’m trying to create an Automation which can detect if any of the admins in my env changes the account settings such as “Require Two-Factor Authentication (2FA)” but I’m unable to find the right way to get the current state of this and similar settings in the first place using an API.

Please share the API endpoint or SDK module, which can be helpful, I highly appreciate your help :slightly_smiling_face:

Best

Hi, @AdminPerimeters :waving_hand: Welcome to our community! This is a great question. There isn’t a specific endpoint for us to use. And we have an option depending on exactly what you need.

The Account Activity API has an endpoint titled — Get security activity for a HubSpot account GET/account-info/v3/activity/security
This endpoint returns the information from the in-app Security Audit export. This export contains the following details:

For each user action, the export will show:

    • the time of the action
    • the type of action
    • the user’s email address
    • the ID of the affected object
    • the approximate location
    • a link to the URL where the action was taken in the account

You could set up an app to poll this endpoint on a set frequency and then compare the results for Adding, removing, or requiring single sign-on (SSO) or two-factor authentication (2FA). The endpoint allows you to pass a timestamp and return only results after the timestamp. The limitation is this endpoint does not allow us to specify what is returned to the result. It’s all or nothing. You’ll need to search for the change and filter the response outside these specific API calls.

Have fun building! — Jaycee

Hello @Jaycee_Lewis, Is it possible to get this data with the Developer CMS account?

Looking forward to hearing from you soon.

Best