You are seeing two related errors during table migration with Databricks Labs UCX for Unity Catalog:
-
For create-table-mapping:
โValueError: Please run as account-admin: databricks labs ucx sync-workspace-infoโ
-
For sync-workspace-info:
โError: entrypoint: login: invalid Databricks Account configurationโ
Below are possible causes and troubleshooting steps for your situation.
Administrative Permissions
Even if you are an admin within your Databricks workspace, UCX commands for Unity Catalog migration require Databricks Account Admin privileges at the account-level outside of just workspace admin. Double-check you are signed in as an account-level admin, not just a workspace admin.
Proper Databricks CLI Authentication
-
Unity Catalog and UCX require the newer Databricks CLI (version 0.200+) authentication using OAuth or personal access tokenโnever the legacy databricks-cli config method for Account-level APIs.
-
The following fields are required for account operations in your .databrickscfg profile:
-
account_id
-
host (should be the account URL, often in form https://accounts.azuredatabricks.net)
-
auth_type
-
token (if using token)
-
If your current host is set as the workspace URL (*.azuredatabricks.net), you must switch to the account console URL for account-level operations.
Steps to Resolve
1. Create/OAuth Authenticate an Account Profile
-
Login using new CLI syntax:
Or, for Azure:
-
Choose OAuth and signin as Account Admin.
-
Confirm the profile contains account_id and relevant host.
2. Set the Profile for UCX
When running UCX, specify your account-level profile:
databricks labs ucx sync-workspace-info --profile <ACCOUNT_PROFILE_NAME>
Ensure you run commands with this profile, not the workspace-level profile.
3. Ensure Updated CLI and UCX Versions
-
Update Databricks CLI:
pip install --upgrade databricks-cli
-
Update Databricks Labs UCX:
pip install --upgrade databricks-labs-ucx
4. Validate Account Admin Role
-
Go to the Databricks Account Console.
-
Under "Account Users", confirm your user is marked as "Account Admin".
Additional Notes
-
Only Account Admins can access workspace info needed for Unity Catalog migration.
-
Even if logged in as workspace admin, APIs for UCX migration require account-level permissions and configuration.
-
You may need to ask your Databricks administrator to grant you Account Admin privileges if your user is not configured properly.
If fixing the profile and permissions does not resolve it, consult the Databricks UCX docs or contact Databricks Support for more specific debugging.
References