Migrate your tenant from the legacy Auth0 Guardian phone configuration to the Unified Phone Experience (UPE) using the Auth0 Terraform Provider. After migration, all multi-factor authentication (MFA) phone notifications route through a single tenant-level phone provider.Documentation Index
Fetch the complete documentation index at: https://docs-staging.auth0-mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before you begin migration, you need:- Auth0 Terraform Provider v1.49.0 or later.
- If you want to configure a custom phone provider, create and deploy a
custom-phone-providerAuth0 Action to handle message delivery.
Enable the phone provider resource and remove legacy configuration
To enable the Terraformauth0_phone_provider resource and clean up legacy configuration:
- Set the phone_consolidated_experience flag to true
- Add the tenant-level phone provider
- Add the auth0_branding_phone_notification_template resource (optional)
- Clean up the auth0_guardian resource phone block
- Plan and apply
Set the consolidated experience flag
To ensure your Auth0 tenant enables UPE and routes all MFA phone notifications through the unified provider, edit yourauth0_tenant resource and set the phone_consolidated_experience flag to true.
Add the tenant-level phone provider
Create a tenant-level phone provider using the Terraformauth0_phone_provider resource to handle delivery for all phone-based flows under the Unified Phone Experience.
- Twilio
- Custom (Actions)
delivery_methods to ["text"].Add the auth0_branding_phone_notification_template resource (optional)
If you useenrollment_message or verification_message on the legacy Guardian phone block to customize one-time passcode (OTP) message text, you can replicate that behavior with the auth0_branding_phone_notification_template resource.
Clean up the Auth0 Guardian resource phone block
Remove all legacy provider-specific attributes from theauth0_guardian phone block.
After cleanup, the block should contain only the enabled and message_types attributes plus a depends_on block that references the auth0_tenant.main and auth0_phone_provider.default resources. This applies UPE and phone-provider configuration before the legacy Guardian phone block.
Before:
Plan and apply
Review the plan carefully before applying. You should see:auth0_phone_provider.defaultcreatedauth0_guardian.defaultupdated (attributes removed)auth0_tenant.mainupdated (phone_consolidated_experience = true)auth0_branding_phone_notification_template.defaultcreated (if added)
Troubleshooting
403 Forbidden errors during terraform apply
This error typically means thatphone_consolidated_experience was already set to true when Terraform tried to manage legacy Guardian phone attributes. Ensure that the depends_on block references auth0_tenant.main and auth0_phone_provider.default so that Terraform applies them in the correct order.
409 Conflict error: Message Type is not supported by the configured phone provider
This error means themessage_types value on the auth0_guardian resource is not supported by the configured provider. Ensure the provider’s delivery_methods covers the requested message_types. Use message_types: ["sms"] for text delivery, or message_types: ["voice"] for voice delivery.
Terraform apply error: Provider or options cannot be specified
The legacyauth0_guardian resource still has a provider attribute or options block while UPE is enabled. Remove provider and options from the configuration so the phone block contains only the enabled and message_types settings.
Custom phone provider not delivering messages
Verify that the Auth0 Action with the custom-phone-provider trigger exists and is deployed in Auth0 before you runterraform apply.
OTP messages not arriving after migration
Confirm theauth0_phone_provider credentials are correct and that delivery_methods includes "text" for SMS. If you previously used a Messaging Service SID, ensure mssid is set on the new provider.