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: 
I faced this issue in XCODE Version 8.3.3 (8E3004b). To resolve this go to project settings. In capabilities tab -> iCloud -> containers. Verify whether valid iCloud containers are selected and you have permission to access these containers. This should resolve the issue.
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.