Generate Verification Code
📖 Definition
The "Generate Verification Code" action allows Google Workspace administrators to generate a new set of backup verification codes for a specific user. These codes are used as a fallback method during two-step verification, ensuring that users can still access their accounts if their primary authentication method (such as a mobile device or authenticator app) is unavailable.
This action is especially useful for administrators supporting users who have lost access to their verification devices or need immediate access restoration.
Key capabilities include:
- Generating a new set of backup codes for user account recovery,
- Supporting secure account access in cases where two-step verification is disrupted,
- Enabling quick response for IT teams during access issues or account recovery scenarios.
🎯 Example Use Cases
🔐 User Lost Access to 2FA Device
An employee loses their phone and cannot complete two-step verification. The admin can generate backup codes to help the user regain access securely.
🧳 User Traveling Without 2FA Access
A user is traveling and doesn't have access to their usual authentication device. Admins can generate backup codes in advance to ensure continued access.
👥 Assisting VIP Users or Executives
Executives or high-profile users require immediate access during an emergency. IT can quickly generate verification codes without waiting for device recovery.
🔄 Resetting Verification Codes for Security
If a user suspects that their backup codes have been compromised, the admin can revoke old codes and generate a fresh set instantly.
📥 Inputs
-
Connection
This is how Zenphi securely connects to your Google Workspace environment to perform admin actions on your behalf.
Details: You’ll need to set up a Google Workspace Administration connection, which uses a service account with domain-wide delegation. This ensures Zenphi has permission to act as an administrator and generate verification codes for users.
Credential Requirement: You’ll need to upload a JSON credential file for the service account.
Setup Guide: Creating a Google Workspace Administration Connection
Think of this as granting Zenphi secure access to act on your admin account’s behalf in order to manage your users.
-
User Primary Email
This is the email address of the user you want to generate backup verification codes for.
Details: The email must match the user’s current primary email in your Google Workspace domain. Zenphi will use this to identify the correct user account when performing the action.
For example:
[email protected]
📤 Outputs
-
User Primary Email
The primary email address of the user for whom the backup verification codes were generated.
Details: This confirms which user account the codes are associated with. It’s helpful for logging and reviewing the results of the action within your Zenphi flow.
Example:
[email protected]
-
User Id
The unique identifier assigned to the user in your Google Workspace domain.
Details: Unlike email addresses (which can change), this ID is a permanent and unique reference to the user's account in the system. Useful for tracking or integrating with other systems where a consistent identifier is needed.
Example:
1234567890abcdef
-
Verification Codes
A list of newly generated backup verification codes for the user.
Details: These are single-use codes that users can enter during the two-step verification process if they don’t have access to their usual authentication method. Each code can typically be used once and provides an emergency way for users to log in securely.
These codes should be shared securely with the user and stored with caution, as they provide login access.
💡 Example
Helping an Employee Regain Access After Losing Their Phone
**Scenario:**An employee, Alex, loses their phone while traveling and can’t complete the two-step verification to access their Google Workspace account. As the admin, you need to quickly generate backup codes so Alex can log in and continue working.
Steps to Set Up in Zenphi:
-
Add the "Generate Verification Code" action to your flow.
-
Configure the inputs:
- Connection: Use your Google Workspace Administration connection (ensure it’s set up with a valid service account and domain-wide delegation).
- User Primary Email: Enter Alex’s email address (e.g.,
[email protected]
).
-
Run the flow: The action generates a fresh list of backup codes.
-
Share securely: Provide the codes to Alex via a secure communication channel (like a phone call or secure messaging tool).
**Outcome:**Alex receives a list of one-time use backup codes, uses one to log in, and regains access to their account without waiting for a replacement device.
Updated about 3 hours ago