{"record":{"id":"23338afc42950cc4","repo":"home-assistant/core","slug":"unable-to-load-auth-provider-provider-err","errorCode":null,"errorMessage":"Unable to load auth provider {provider}: {err}","messagePattern":"Unable to load auth provider (.+?): (.+?)","errorType":"exception","errorClass":"HomeAssistantError","httpStatus":null,"severity":"error","filePath":"homeassistant/auth/providers/__init__.py","lineNumber":172,"sourceCode":"            provider_name,\n            humanize_error(config, err),\n        )\n        raise\n\n    return AUTH_PROVIDERS[provider_name](hass, store, config)\n\n\nasync def load_auth_provider_module(\n    hass: HomeAssistant, provider: str\n) -> types.ModuleType:\n    \"\"\"Load an auth provider.\"\"\"\n    try:\n        module = await async_import_module(\n            hass, f\"homeassistant.auth.providers.{provider}\"\n        )\n    except ImportError as err:\n        _LOGGER.error(\"Unable to load auth provider %s: %s\", provider, err)\n        raise HomeAssistantError(\n            f\"Unable to load auth provider {provider}: {err}\"\n        ) from err\n\n    if hass.config.skip_pip or not hasattr(module, \"REQUIREMENTS\"):\n        return module\n\n    if (processed := hass.data.get(DATA_REQS)) is None:\n        processed = hass.data[DATA_REQS] = set()\n    elif provider in processed:\n        return module\n\n    reqs = module.REQUIREMENTS\n    await requirements.async_process_requirements(\n        hass, f\"auth provider {provider}\", reqs\n    )\n\n    processed.add(provider)\n    return module","sourceCodeStart":154,"sourceCodeEnd":190,"githubUrl":"https://github.com/home-assistant/core/blob/58a3fdb3ea0538617f0a07efcfba6294de64fd59/homeassistant/auth/providers/__init__.py#L154-L190","documentation":"Raised as HomeAssistantError by load_auth_provider_module (homeassistant/auth/providers/__init__.py:172) when importing homeassistant.auth.providers.{provider} fails with ImportError. The provider string comes from the `type:` key of each entry under homeassistant.auth_providers in configuration.yaml; an unknown/renamed type triggers this. The ImportError is logged and chained via `from err`.","triggerScenarios":"configuration.yaml has homeassistant.auth_providers with type: legacy_api_password after it was removed; typo like type: homeassistant_Provider; referencing a custom provider package that no longer exists or fails to import.","commonSituations":"Upgrading Home Assistant past a provider removal (e.g. legacy_api_password dropped in 2025.x); stale config from old tutorials; custom component providers whose import raises.","solutions":["Correct the `type:` value to a registered provider (homeassistant, trusted_networks, command_line, legacy_api_password if still supported)","Check the preceding log line 'Unable to load auth provider %s: %s' for the real ImportError detail","Remove obsolete provider blocks after a version upgrade and restart"],"exampleFix":"# before (configuration.yaml)\nhomeassistant:\n  auth_providers:\n    - type: legacy_api_password  # removed in newer versions\n\n# after\nhomeassistant:\n  auth_providers:\n    - type: homeassistant","handlingStrategy":"validation","validationCode":"from homeassistant.auth import providers\nassert provider_type in providers.AUTH_PROVIDERS, f\"unknown provider {provider_type}\"","typeGuard":"def provider_registered(provider_type: str) -> bool:\n    from homeassistant.auth import providers\n    return provider_type in providers.AUTH_PROVIDERS","tryCatchPattern":"from homeassistant.exceptions import HomeAssistantError\ntry:\n    await providers.load_auth_provider_module(hass, provider)\nexcept HomeAssistantError as err:\n    if not str(err).startswith(\"Unable to load auth provider\"):\n        raise","preventionTips":["After upgrading, review release notes for removed auth providers (e.g. legacy_api_password)","Use `hass --script check_config` to validate auth_providers sections","Keep the ImportError context from the log — it often points to a missing dependency"],"tags":["auth","python","home-assistant","auth-provider","config","import-error"],"backgroundTag":null,"analyzedSha":"58a3fdb3ea0538617f0a07efcfba6294de64fd59","analyzedAt":"2026-08-14T20:54:38.818Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}