core icon indicating copy to clipboard operation
core copied to clipboard

iCloud requires verification code even when using app password

Open gtbdf1 opened this issue 1 year ago • 16 comments

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

gtbdf1 avatar Jul 10 '24 23:07 gtbdf1

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 close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign icloud Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove 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)

home-assistant[bot] avatar Jul 10 '24 23:07 home-assistant[bot]

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)

HerveG45 avatar Jul 11 '24 08:07 HerveG45

Same here since 2024.7.2 Need to refresh manually the states of Apple devices with the service ICLOUD.UPDATE

Pipo31416 avatar Jul 14 '24 04:07 Pipo31416

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

razvan1despa avatar Jul 15 '24 14:07 razvan1despa

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:

  1. I went in and deleted both the integration and icloud folder in .storage, per docs troubleshooting section and previous experience with this integration.
  2. 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:

image

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.

rake8288 avatar Jul 17 '24 06:07 rake8288

Same issue here.

wneessen avatar Jul 20 '24 10:07 wneessen

never worked for me

rightsaidfred99 avatar Jul 21 '24 02:07 rightsaidfred99

Same problem for me and some other users as reported by @rake8288

ciddi89 avatar Jul 23 '24 10:07 ciddi89

I get the same with an app specific password. Makes the integration useless.

bukurat avatar Jul 27 '24 00:07 bukurat

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.

cjsmns avatar Jul 30 '24 00:07 cjsmns

same, same... simply will not authenticate any longer

dyoung522 avatar Aug 01 '24 01:08 dyoung522

Same problem here.

MrSkutt avatar Aug 08 '24 09:08 MrSkutt

Same issue here, still prompted for iCloud verification code when using App-specific password, which Apple doesn't send.

drudge avatar Aug 15 '24 15:08 drudge

Any updates on this? I'm having the same issues.

dwwkelly avatar Aug 29 '24 01:08 dwwkelly

I'm having the same issue. Any progress on a resolution?

gabefortin avatar Oct 18 '24 13:10 gabefortin

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

HerveG45 avatar Oct 19 '24 16:10 HerveG45

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.