TomDK
(Thomas)
January 22, 2022, 12:05pm
1
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
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
thoompje
(Thoompje)
February 7, 2022, 9:27pm
6
I got the same issue… For more then two weeks now.
gabrio79
(Gabrio79)
February 8, 2022, 10:14am
8
Jonah1970:
access
but HA requires administrator privilege… so can give itself the grants
dknils
(Nils)
February 9, 2022, 7:51pm
9
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
daggy72
(Dagmar Sporck)
February 14, 2022, 1:18pm
10
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
gabrio79
(Gabrio79)
February 16, 2022, 11:58am
11
did someone opened am issue on HA?
mparis
(Marcoparigi)
May 13, 2024, 1:20pm
14
Hi,
the problem comes back after upgrading HA to last version today
1 Like
ozhound
(Ozhound)
May 28, 2024, 6:33am
15
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'}
eliliam
(Eli Smith)
December 4, 2024, 12:49am
16
What is the current fix for this? Is there a way to make this integration usable?
I’ve started running into this today as well. Seeing the same thing as above:
2025-01-29 10:09:57.366 DEBUG (MainThread) [synology_dsm.synology_dsm] API: SYNO.API.Auth
2025-01-29 10:09:57.366 DEBUG (MainThread) [synology_dsm.synology_dsm] Request Method: GET
2025-01-29 10:09:57.896 DEBUG (MainThread) [synology_dsm.synology_dsm] Request url: https://192.168.1.119:5051/webapi/entry.cgi?account=*********&passwd=*********&enable_device_token=yes&device_name=d9eedc928f7b&device_id=*********&api=SYNO.API.Auth&version=7&method=login
2025-01-29 10:09:57.897 DEBUG (MainThread) [synology_dsm.synology_dsm] Response status_code: 200
2025-01-29 10:09:57.897 DEBUG (MainThread) [synology_dsm.synology_dsm] Response headers: {'Server': 'noindex', 'Date': 'Wed, 29 Jan 2025 18:09:57 GMT', 'Content-Type': 'application/json; charset="UTF-8"', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Keep-Alive': 'timeout=20', 'X-Content-Type-Options': 'nosniff', 'X-XSS-Protection': '1; mode=block', 'Cache-Control': 'max-age=0, no-cache, no-store, must-revalidate', 'Pragma': 'no-cache', 'Expires': '0'}
2025-01-29 10:09:57.899 DEBUG (MainThread) [synology_dsm.synology_dsm] Successful returned data
2025-01-29 10:09:57.899 DEBUG (MainThread) [synology_dsm.synology_dsm] RESPONSE: {'error': {'code': 403, 'errors': {'token': 'xyz', 'types': [{'type': 'fido'}, {'type': 'otp'}]}}, 'success': False}
This was user error. I had disabled this setting and it’s needed.
opened 10:01AM - 17 Aug 24 UTC
closed 10:59AM - 18 Jan 25 UTC
problem in device
stale
integration: synology_dsm
### The problem
The Synology DSM integration fails to setup a new integration e… ntry with
`Failed to set up: reason: Two-step authentication required for account: homeassistant`
It was thought that this would fix it however it didn't unfortunately for me.
https://github.com/home-assistant/core/issues/110848#issuecomment-2286382116
I have tried restarting ha, and also checked the Synology logs and saw that all attempts were successful by the homeassistant user.
Synology information
Model: DS220+
Software version: DSM 7.2.1-69057 Update 5
Synology logs
```
Info
Connection
08/17/2024 05:45:51 am
homeassistant
User [homeassistant] from [192.168.15.1] has successfully passed the first authentication of 2FA via [password]
Info
Connection
08/17/2024 05:45:49 am
homeassistant
User [homeassistant] from [192.168.15.1] signed in to [DSM] successfully via [password].
Info
Connection
08/17/2024 05:45:46 am
homeassistant
User [homeassistant] from [192.168.15.1] has successfully passed the first authentication of 2FA via [password]
Info
Connection
08/17/2024 05:45:01 am
homeassistant
User [homeassistant] from [192.168.15.1] has successfully passed the first authentication of 2FA via [password]
```
Attached is the logs from Synology integration and synology_dsm library.
[synology 2fa logs.txt](https://github.com/user-attachments/files/16644335/synology.2fa.logs.txt)
### What version of Home Assistant Core has the issue?
2024.8.2
### What was the last working version of Home Assistant Core?
_No response_
### What type of installation are you running?
Home Assistant Container
### Integration causing the issue
synology_dsm
### Link to integration documentation on our website
_No response_
### Diagnostics information
_No response_
### Example YAML snippet
_No response_
### Anything in the logs that might be useful for us?
```txt
Logs were posted above.
```
### Additional information
_No response_