# Domain restricted sharing

Facts read 10 Nov 2026. Page reviewed 16 Nov 2026.

Domain restricted sharing is a Google Cloud guardrail written in organization Policy Service. Limits which organization principal sets and Google Workspace customer IDs can be added to IAM policies, so roles cannot be granted to outside identities. No documented way to test it before enforcement was found on 10 Nov 2026.

```yaml
name: organizations/ORGANIZATION_ID/policies/iam.allowedPolicyMemberDomains
spec:
 rules:
 - condition: # This condition applies to the values block.
    expression: "resource.matchTag('ORGANIZATION_ID/environment', 'dev')"
   values:
    allowedValues:
    - PRINCIPAL_SET
 - values:
    allowedValues:
    - PRINCIPAL_SET
```

- **Blocks:** Limits which organization principal sets and Google Workspace customer IDs can be added to IAM policies, so roles cannot be granted to outside identities. (legacy managed constraint, list.)
- **Breaks:** Google documents that the organization principal set and Google Workspace ID are not automatically allowed, so they must be listed to let your own principals be granted roles. ([source](https://cloud.google.com/resource-manager/docs/organization-policy/restricting-domains))
- **Test before applying:** As for every Organization Policy Service guardrail: [how to test before enforcing](/mechanisms/org-policy/)
- **Mechanism:** [Organization Policy Service (managed and legacy constraints)](/mechanisms/org-policy/): Resources in the organization, folder or project where the policy is set and its descendants; Google says application of new policies is usually not retroactive.
- **Taken from:** [provider documentation](https://cloud.google.com/resource-manager/docs/organization-policy/restricting-domains), provider documentation

## What the source says

"Domain-restricted sharing lets you limit resource sharing based on a domain or organization resource." (read 10 Nov 2026).

On what it breaks: "Your organization principal set and Google Workspace ID are not automatically allowed."

## Related guardrails

- [Deny AWS RAM sharing with external accounts](/guardrails/aws-scp-deny-ram-external-sharing/): AWS, Service control policies (SCPs), data exfiltration
- [Block public sharing of EBS snapshots (declarative policy)](/guardrails/aws-declarative-snapshot-block-public-access/): AWS, Declarative policies, data exfiltration
- [Storage SAS tokens should adhere to 7 day maximum validity](/guardrails/azure-policy-storage-sas-7-days/): Azure, Azure Policy (built-in definitions), data exfiltration
- [Service perimeter around managed services](/guardrails/gcp-vpcsc-service-perimeter/): Google Cloud, VPC Service Controls (service perimeters), data exfiltration
- [Allowed destinations for exporting resources](/guardrails/gcp-orgpolicy-allowed-export-destinations/): Google Cloud, Organization Policy Service (managed and legacy constraints), data exfiltration
- [Custom constraint limiting IAM role grants to organization members](/guardrails/gcp-custom-allow-internal-and-special-identities/): Google Cloud, Custom organization policy constraints, data exfiltration

## Related pages

- [Service perimeter around managed services (Google Cloud VPC Service Controls)](/guardrails/gcp-vpcsc-service-perimeter/)
- [Allowed destinations for exporting resources (Google Cloud Organization Policy Service)](/guardrails/gcp-orgpolicy-allowed-export-destinations/)
- [Custom constraint limiting IAM role grants to organization members (Google Cloud Custom organization policy constraints)](/guardrails/gcp-custom-allow-internal-and-special-identities/)

## Sources

- Domain restricted sharing: https://cloud.google.com/resource-manager/docs/organization-policy/restricting-domains (read 10 Nov 2026)
- How to test it first: https://cloud.google.com/resource-manager/docs/organization-policy/dry-run-policy (read 10 Nov 2026)

Last reviewed 16 Nov 2026. Canonical: https://cloudgovernancetools.com/guardrails/gcp-orgpolicy-domain-restricted-sharing/
