How can one understand if a user has used SFMC APIs or SSJS scripts to log in to SFMC?

432    Asked by asutos_8102 in Salesforce , Asked on Aug 18, 2023

 When I was creating a cloud page my requirement was that only those users who have SFMC can get access to the page. If users have not logged in to SFMC, they will need to log in to SFMC via MFA or SSO. 

So, can I find a way to check if a user has logged in to SFMC? 

Answered by Dan Peters
 Enabling the Audit Trail is essential to find out if SEMC login has happened. 
Email Studio > Admin > Security Settings > Enable Audit Trail Data Collection: Yes.
When the Audit Trail is enabled, it has a REST API endpoint, which looks like this:
YOURTENANT. Rest. marketingcloudapis.com/data/v1/audit/auditevents.

You can use the REST API endpoint in a script activity and take it to data extension. Some of the properties that are returned are id, employee.id, createdDate, memberId, operation.id, enterpriseId, object.id, transactionId, object.name, employee.userName.



Your Answer

Interviews

Parent Categories