Synology DSM failed to set up: Two-step authentication required

Hi,

I was following the guide at: Synology DSM - Home Assistant and everything worked as described when configuring the integration, but right after punching in the security code, and the message that re-configuration was successful, the integration is showing

Failed to set up: reason: Two-step authentication required for account: myaccount

That is leaving me with nothing configured at all. No device and no entities. Clearly the setup to utilise 2-factor authentication went trough, but something else is failing.

Any suggestions?

2 Likes

Hi Thomas, I got the same issue after enabling 2FA today. Also followed the guide for creating a separate administrator account just for HA and succesfully configured 2FA in DSM. After entering username, password and OTP in Home Assistant I too get the message “succesfully configured” but integration not working and log showing "Config entry ‘192.168.xxx.xxx’ for synology_dsm integration could not authenticate: reason: Two-step authentication required for account: [Myaccountname]

Searching in older topics I found this problem existed back in july for users just updating to DSM 7 but was fixed in Home Assistant 2021.8.4

Seems to be broken again now :slight_smile:

EDIT: I’m on DSM 7.0.1-42218 Update 2; Home Assistant 2021.12.10

1 Like

same problem here…
DSM 7.0.1-42218 Update 2 // Home Assistant 2021.12.10

A possible workaround would be the disable the 2FA on the Home Assistant Synology account then lock this down in the user config i.e. disable access to all Shared Folders and Applications which is mentioned in the docs:

Same issue since update to DSM 7.0.1-42218 Update 2 :confused:

I got the same issue… For more then two weeks now.

same issue…

but HA requires administrator privilege… so can give itself the grants

same problem here…

DSM 7.0.1-42218 Update 2 and Home Assistant 2022.2.5

The log is saying …

2022-02-09 20:17:57 DEBUG (SyncWorker_4) [synology_dsm.synology_dsm] API: SYNO.API.Auth
2022-02-09 20:17:57 DEBUG (SyncWorker_4) [synology_dsm.synology_dsm] RESPONSE: {'error': {'code': 403, 'errors': {'token': 'xyz', 'types': [{'type': 'otp'}]}}, 'success': False}
...
2022-02-09 20:17:58 WARNING (MainThread) [homeassistant.config_entries] Config entry 'BudStation' for synology_dsm integration could not authenticate: reason: Two-step authentication required for account: Home_Assistant
1 Like

same here.
relogin with credentials and OTP is successful yet the Integration remains “Failed”

DSM v7.0.1-42218 (Update 2)
HA 2022.2.6

did someone opened am issue on HA?

found it

Hi,
the problem comes back after upgrading HA to last version today

1 Like

Ive started to get this issue after 6 months of perfect usage

Logger: homeassistant
Source: components/synology_dsm/common.py:103
First occurred: 2:28:06 PM (2 occurrences)
Last logged: 2:28:48 PM

Error doing job: Future exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/synology_dsm/common.py", line 103, in async_login
    await self.dsm.login()
  File "/usr/local/lib/python3.12/site-packages/synology_dsm/synology_dsm.py", line 193, in login
    raise switcher.get(
synology_dsm.exceptions.SynologyDSMLogin2SARequiredException: {'api': 'SYNO.API.Auth', 'code': 403, 'reason': 'One time password not specified', 'details': 'Two-step authentication required for account: ha'}

What is the current fix for this? Is there a way to make this integration usable?