Skip to Content
Setup Guide5. First Test

Step 5: First User Test

⏱️5 minutes

Test the complete flow with a real user to verify everything works.

Prerequisites

Before Testing

  • Connector showing Online in portal
  • At least one policy configured
  • Test user enrolled with WhatsApp number
  • Access to test user's email (for OTP)

Step 1: Enroll Test User

  1. In Admin Portal, go to UsersEnroll User
  2. Search for a test user in AD
  3. Enter their WhatsApp number (international format: +5511999999999)
  4. Click Enroll
Expected Result

User appears in enrolled users list with:

  • Name: Test User
  • WhatsApp: +5511999999999
  • Status: Active

Step 2: Lock the Test Account

For testing account unlock, first lock the account:

# Lock account by setting bad password attempts # Or simply use: Set-ADAccountPassword -Identity testuser -NewPassword (ConvertTo-SecureString "WrongPassword123!" -AsPlainText -Force) # Enter wrong password multiple times to lock

Or use this to directly set lockout:

# Lock account $user = Get-ADUser -Identity testuser $user.lockoutTime = (Get-Date).ToFileTime() Set-ADUser -Instance $user # Verify locked Get-ADUser -Identity testuser -Properties LockedOut | Select-Object LockedOut # Should return True

Step 3: Send WhatsApp Message

From the test user’s phone, send a WhatsApp message to your AD Unlock number:

My account is locked

Or in Portuguese:

Minha conta está bloqueada

Step 4: Verify OTP Flow

Expected Result
  1. AD Unlock responds:

    “I found your account (testuser@company.com). To verify your identity, I’ve sent a 6-digit code to your email. Please enter the code here.”

  2. Check test user’s email: Subject: “AD Unlock Verification Code” Body contains: 6-digit code (e.g., 847291)

  3. Reply with the code:

    847291

  4. AD Unlock responds:

    ”✅ Verified! Your account has been unlocked. You can log in now.”

Step 5: Verify Account Unlocked

Get-ADUser -Identity testuser -Properties LockedOut | Select-Object LockedOut # Should return False

Step 6: Check Audit Log

In Admin Portal:

  1. Go to Requests or Audit Log
  2. Find the test request
Expected Result
Request #12345 User: testuser@company.com Action: Account Unlock Status: Completed Risk Score: 15 (Low) Policy: Standard Users Approved: Auto (risk within threshold) Duration: 1.2 seconds

Test Password Reset (Optional)

To test password reset:

  1. Send: “I need to reset my password”
  2. Complete OTP verification
  3. Check test user’s email for new password
  4. Verify login with new password

Remember: Passwords are ONLY sent via email, never WhatsApp.

🔧If Something Goes Wrong
SymptomCauseSolution
No response from WhatsAppWebhook not configured or Z-API disconnectedCheck Z-API dashboard, verify webhook URL
User not foundUser not enrolled or phone number mismatchVerify enrollment and phone number format (+country code)
OTP not receivedEmail not configured or wrong email addressCheck email settings, verify user's email in AD
Unlock failedConnector offline or permissions issueCheck connector status, verify service account permissions
Request blockedRisk score too high or policy blockingCheck risk factors, adjust policy thresholds

Verification Complete

All Tests Passed?

  • WhatsApp message received by AD Unlock
  • OTP sent to email
  • OTP verification successful
  • Account unlocked (or password reset)
  • Audit log shows request
  • Connector still Online

Congratulations!

Your AD Unlock installation is complete and working.

Last updated on