Question: I'm getting this error with code signing with Xcode 8:

> 
> Your account does not have sufficient permissions to modify containers
> 
> 
> 

[![enter image description here](https://i.stack.imgur.com/9nx1E.png)](https://i.stack.imgur.com/9nx1E.png)

What does it want from me?

Answer: 
Just had this issue with XCode 8.3.2 after we enabled iCloud Capabilities and the entitlements changed. We use automatic signing - xcode managed profile. Going into Xcode -> Preferences -> Download All Profiles wouldn't fix the problem UNTIL we temporarily made team members Admin and repeated the process. At that point XCode realized the new provisioning profile and the problem was solved.
I was getting this error because I was in *another* team (my university team account), which was **severely limiting my access** to `developer.apple.com` features. **Once I left that team** (I added an answers [here](https://apple.stackexchange.com/questions/345313/how-to-leave-apple-developer-program-on-developer-apple-com) because even this was a bit of a pain), I was able to remove & re-add my account to XCode. It then worked.

EDIT: It happened again on a new machine (an M1 mac), and this time I had left the university account. **By removing and adding back "Apple Pay" capability in `Signing & Capabilities`, it immediately fixed itself.**

---

None of the other answers worked for me. E.g. The app doesn't even use iCloud, and enabling-disabling it didn't help. Deleting profiles, revoking certificates, disabling/re-enabling automatically manage signing also didn't help.