apple developer id is not able to add in xcode 8.2, it gives error like below.
The issue seems to be on the Apple's side and is not related to Two-Factor Authentication. I contacted the Apple Developer Support by filling in this form:
https://developer.apple.com/contact/apple-id/
They fixed the issue for my account by next day. I got this answer by email:
We believe this issue has been resolved. I encourage you to try to sign in to Xcode later on today. If you are still encountering this specific issue, please send us a screenshot of the error and steps to reproduce the issue.
Don't hesitate to contact the support team.