This can happen after restoring a backup of a device to another, or after transferring data using iMazing's 'Transfer to another Device' wizard.

The problem can also appear when setting up a device which has 2 Apple IDs (1 for iCloud and one for the App Store for example).

Solution 1:

Try to shutdown your Wi-Fi router to make sure your device cannot connect to it. Then, go back to the beginning of the setup assistant on the device, and go through the steps again. You should now have the option to choose 'Don't sign in' or 'Skip this step' in the lower part of the screen at the Apple ID sign in stage.

Once you've passed the setup assistant, you can re-enable your Wi-Fi router and sign in to your Apple ID when prompted by iOS, or via the Settings app's Apple ID, iCloud, iTunes and App Store section.

Solution 2:

Depending on the precise iOS version, the iOS Setup Assistant may not actually require you to sign in. You can bypass the sign in screen following these steps:

Delete your Apple ID password from the password field

Tap 'Back' to go to the previous step

Tap 'Back' again until you reach the 'language selection' step

Now follow steps again until you arrive on Apple ID authentication screen

You can now skip the sign in step ('Don't sign in' or 'Skip this step' button in the lower part of the screen).

You can then sign in via the Settings App on your device, where the error should not occur again.

On devices running iOS 11, it may be needed to remove the device from your account:

If you have another iOS device logged in the same Apple ID, head to its Settings app and tap the first option, labelled Apple ID, iCloud, iTunes & App Store. On the next screen, you will see all your signed in devices listed. Tap the one which is giving you the sign in error, and choose Remove from Account.

Otherwise, login to iCloud.com and navigate to Settings. You can remove the troublesome device from your account there by clicking the device, and then the little blue cross:

Once your device is fully removed from your account, you should be able to sign in without errors, or to skip the sign in step altogether.

To avoid this error message in the future, you can check Erase target device(s) when restoring backups with iMazing.