ICloud Entitlements missing in provisioning profile

I am using XCode 8.1 and have enabled iCloud documents capability in the capabilities tab of the target. I can see the following entries getting generated in the Entitlements file:

iCloud Container Identifiers
iCloud Services
Ubiquity Container Identifiers

I have also enabled iCloud in the provisioning profile. But still I’m getting issues that these 3 entitlements are missing in the profile.

If I select “Automatically Manage Signing option” in XCode, then I get the following error:

Your account does not have sufficient permissions to modify containers.

Could anybody please help me understand if I am missing something here?