Try going into Xcode > Preferences > Accounts and click all of the Apple ID's you have listed on the left and clicke the - (minus) sign on the bottom. Make sure everything is removed then click the + (plus) and Add Apple ID. See if re adding your accounts to Xcode solves the issue.
Topic:
Code Signing
SubTopic:
Certificates, Identifiers & Profiles
Tags: