iCloud requires verification code even when using app password
The problem
When using application passwords in iCloud, a verification code is not generated. However, the integration still requires a verification code during set up when using an app specific password.
What version of Home Assistant Core has the issue?
Core-2024.7.2
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
iCloud
Link to integration documentation on our website
https://www.home-assistant.io/integrations/icloud/
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
Hey there @quentame, @nzapponi, mind taking a look at this issue as it has been labeled with an integration (icloud) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of icloud can trigger bot actions by commenting:
@home-assistant closeCloses the issue.@home-assistant rename Awesome new titleRenames the issue.@home-assistant reopenReopen the issue.@home-assistant unassign icloudRemoves the current integration label and assignees on the issue, add the integration domain after the command.@home-assistant add-label needs-more-informationAdd a label (needs-more-information, problem in dependency, problem in custom component) to the issue.@home-assistant remove-label needs-more-informationRemove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.
(message by CodeOwnersMention)
icloud documentation icloud source (message by IssueLinks)
Hello, since creating a specific password for an application, I have been receiving regular error messages in the Home Assistant log. A copy of the message is attached.
Enregistreur: homeassistant.components.icloud.account Source: components/icloud/account.py:173 intégration: Apple iCloud (documentation, problèmes) S'est produit pour la première fois: 10:12:17 (6 occurrences) Dernier enregistrement: 10:22:27
Unknown iCloud error: Authentication required for Account. (450)
Enregistreur: pyicloud.base Source: components/icloud/account.py:171 S'est produit pour la première fois: 10:12:17 (12 occurrences) Dernier enregistrement: 10:22:27
Authentication required for Account. (421) Authentication required for Account. (450)
Same here since 2024.7.2 Need to refresh manually the states of Apple devices with the service ICLOUD.UPDATE
Hi,
I have the same issue ... using 2024.7.2, Supervisor 2024.06.2, OS 12.4, Frontend 20240710.0. When reconfiguring icloud integration and using in-app password, the verification code is being requested, but apple doesn't generate a code. This leave me without the posibility to use the integration.
If you guys need further logs please let me know and i can provide if needed.
Thanks, Razvan
I was also experiencing the same issue. When entering an app-specific password it would prompt for a 2fa code but no request was either sent to Apple or at least none was presented on my devices as one would normally expect.
Troubleshooting Done:
- I went in and deleted both the integration and icloud folder in .storage, per docs troubleshooting section and previous experience with this integration.
- After complecting the above steps, I went to re-add the integration.
Error occurred during auth flow:
- When attempting to re-auth app-specific passwords do not work for login as expected.
Ex:
Error from logs:
2024-07-16 23:35:07.534 ERROR (SyncWorker_59) [pyicloud.base] Missing apple_id field
2024-07-16 23:35:07.534 ERROR (MainThread) [homeassistant.components.icloud.config_flow] Error logging into iCloud service: ('Invalid authentication token.', PyiCloudAPIResponseException('Missing apple_id field'))
At this time the integration is completely unusable as I cannot set it back up.
Same issue here.
never worked for me
Same problem for me and some other users as reported by @rake8288
I get the same with an app specific password. Makes the integration useless.
Also have this issue. Using app specific password and it worked for a day or so, and now it's asking for the 2fa code.
I even went into Settings App > (my name) > Sign-in & Security > Two-Factor Authentication > Get Verification Code on my iPhone and tried that code which didn't work.
At the moment the integration is useless.
same, same... simply will not authenticate any longer
Same problem here.
Same issue here, still prompted for iCloud verification code when using App-specific password, which Apple doesn't send.
Any updates on this? I'm having the same issues.
I'm having the same issue. Any progress on a resolution?
Bonjour,
Aujourd'hui, plus moyen de s'authentifier pour ajouter l'intégration iCloud avec le mot de passe du compte Apple, message d'erreur : unknown error occurred. Ne fonctionne pas avec un mot de passe spécifique pour applications.
Une solution ?
Core 2024.10.3 Supervisor 2024.10.2 Operating System 13.2 Interface utilisateur 20241002.3
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.