SecureMFA Support Tools

All support tools for OTP are packaged into Powershell module. Latest Module can be downloaded from Microsoft PowerShellGallery

Install-Module -Name SecureMFA

Post installation steps:

    • SecureMFA_SupportTools.json configuration file located in "C:\Program Files\WindowsPowerShell\Modules\SecureMFA" folder must be updated with your configuration data.

Bellow is a sample of a valid SecureMFA_SupportTools.Json config file:

             "sql_server": "asqlaol1.adatum.labnet",
             "sql_database": "SecureMfaOTP",
             "ui_input_text": "Please enter user's UPN",
             "ui_environment": "MyCompany",
             "encryption_passphrase": "d9GhT=7=Ox8-+LaZ"


Show-xOTP Shows OTP details for a user .

Show-xOTP -upn test1@adatum.labnet -DecryptSecret
Show-xOTP -upn test1@adatum.labnet -DecryptSecret -otpcode 893117

Reset-xOTP Resets OTP accounts in SQL database

Reset-xOTP -upn test1@adatum.labnet -HardReset


All provider related logs are stored in Windows Application Event logs.

Windows Application Events:

Source: Secure MFA OTP
Event ID 5551: Get user Attribute Events
Event ID 5552: OTP SoftReset Events 
Event ID 5553: OTP HardReset Events 
Event ID 5554: GET OTP List Of Codes Events 
Event ID 5555: Get OTP Time Drift Events
Event ID 5559: System Events

SQL Database Maintenance

Scheduler bellow SQL script to run as weekly job on SQL Server. Script will delete old user records with lastlogon data older than 60 days or value equals NULL .

Delete FROM [SecureMfaOTP].[dbo].[Secrets] WHERE lastlogon < DATEADD(day, -60, GETDATE()) OR lastlogon IS NULL