Every cross-account role, shared resource and cross-tenant setting is a trust path, and attackers who compromise one side inherit whatever the other side granted. Multi-account AWS organisations, multi-tenant Microsoft estates and multi-project Google Cloud environments all depend on these paths for centralised logging, security tooling, managed service providers and partner data exchange. The mechanisms differ: IAM role trust policies, resource-based policies and AWS Resource Access Manager on AWS; Entra ID cross-tenant access settings, cross-tenant synchronisation and Azure Lighthouse on Microsoft; cross-project IAM bindings and service account attachment on Google Cloud. This guide explains how each mechanism works, which settings to restrict, how to log and detect abuse, and what a hardened baseline looks like. It is for cloud platform, identity and security architecture teams. The attacker view of these paths is covered in the MITRE ATT&CK T1199 Trusted Relationship Guide; guest governance in Entra ID is covered in the Entra ID Cross-Tenant Access and B2B Guest Governance Guide.
Key takeaways
- Two models, one risk: access crosses a boundary either because an identity in one account is allowed to act in another (role assumption, delegation, guest accounts) or because a resource is shared outward (resource policies, RAM shares, IAM bindings). Inventory both.
- Third-party roles need an external ID: AWS requires the provider-controlled
sts:ExternalIdin trust policies for third parties to stop confused deputy attacks; service principals needaws:SourceArn,aws:SourceAccountoraws:SourceOrgID. - Default Microsoft settings are open: B2B collaboration is enabled for all internal users with any external organisation by default; tighten with organisational settings and only trust MFA and device claims from tenants you have assessed.
- Delegation has guard rails worth using: Azure Lighthouse delegations exclude Owner and roles with DataActions, but supported roles can still expose data through actions such as
listKeys. Review delegated roles, not just the fact of delegation. - Analysers find what reviews miss: IAM Access Analyzer external access findings, Entra audit logs in category
CrossTenantAccessSettings, and Google Cloud IAM policy audit logs give continuous evidence of who can cross the boundary.
How identity and access work across AWS accounts, Microsoft tenants and Google Cloud projects
| Mechanism | Provider | Direction | What controls it |
|---|---|---|---|
| Cross-account IAM role | AWS | Identity in account A assumes role in account B | Role trust policy (sts:AssumeRole) in B and an identity policy in A; both must allow |
| Resource-based policy | AWS | Resource in B grants a principal in A | Bucket, key, queue, secret or function policy naming the external principal |
| AWS Resource Access Manager (RAM) | AWS | Resource in B shared to accounts, OUs or the organisation | Resource share with a managed permission that caps allowed actions; outside the organisation requires an invitation |
| B2B collaboration | Microsoft Entra ID | External user gets a guest or member object in your tenant | Cross-tenant access settings (inbound and outbound), external collaboration settings |
| B2B direct connect | Microsoft Entra ID | External user accesses shared channels without an object in your tenant | Cross-tenant access settings; blocked by default; requires Entra ID P1 in both tenants |
| Cross-tenant synchronisation | Microsoft Entra ID | Source tenant pushes users and groups into target tenant | Source configures scope and mappings; target must allow user or group synchronisation inbound |
| Azure Lighthouse | Azure | Managing tenant operates on delegated subscriptions or resource groups | Customer-deployed delegation listing principals and built-in roles |
| Multitenant application | Microsoft Entra ID | App registered in vendor tenant gets a service principal in yours | Consent and permissions granted to the service principal |
| Cross-project IAM binding | Google Cloud | Principal from another project or organisation granted a role | SetIamPolicy on the resource, project or folder; domain restricted sharing constraints |
| Cross-project service account attachment | Google Cloud | Resource in project B runs as a service account from project A | iam.disableCrossProjectServiceAccountUsage (enforced by default) and iam.serviceAccounts.actAs |
AWS specifics
- Two-sided allow: a cross-account role assumption succeeds only if the trust policy in the target account and an identity policy in the source account both allow it, and no SCP or RCP denies it. RCPs apply to STS, so an organisation-wide RCP can block role assumption by principals outside the organisation.
- RAM within the organisation: once sharing with AWS Organizations is turned on, shares to accounts or OUs in the organisation need no invitation. Shares outside it start an invitation the recipient must accept. Resources shared through RAM remain subject to the consuming account's IAM and SCPs.
- Global resources can be shared through RAM only from the US East (N. Virginia) Region.
Microsoft specifics
- Default posture: B2B collaboration enabled for all internal users, MFA and device claims not trusted, B2B direct connect blocked, no users synchronised in.
- Trust settings: inbound settings can trust MFA, compliant device and Entra hybrid joined device claims from a named partner, which changes how your Conditional Access policies evaluate their users.
- Automatic redemption suppresses the consent prompt only when enabled outbound in the source and inbound in the target tenant.
- Cross-tenant synchronisation is a push from the source tenant. The source becomes source of authority for all synced attributes, synced users are created as external members by default, and Microsoft positions it for tenants within one organisation; for cross-organisation access it recommends entitlement management.
Google Cloud specifics
- Bindings are the boundary: any principal in any organisation can be granted a role unless domain restricted sharing (
iam.allowedPolicyMemberDomainsoriam.managed.allowedPolicyMembers) restricts it. Organisations created on or after 3 May 2024 have the legacy constraint enforced by default. - Service account attachment across projects needs the constraint relaxed on the project holding the service account, which adds a project lien. Google recommends enforcing
iam.restrictCrossProjectServiceAccountLienRemoval.
Admin roles and privileged access
- AWS: limit who can edit role trust policies (
iam:UpdateAssumeRolePolicy), resource policies and RAM shares. Protect the organisation's security tooling and log archive roles with SCPs so only the security account can assume them. Never grantAdministratorAccessthrough a role whose trust policy includes a third-party account. - Entra ID: cross-tenant access settings require Security Administrator or a custom role. Protect changes to them with Conditional Access protected actions. Treat the role that manages cross-tenant synchronisation as privileged: in the source tenant it decides which identities appear in the target.
- Azure Lighthouse: delegations use roles other than Owner, roles with DataActions and roles that include
Microsoft.Authorization/roleAssignments/write. Use User Access Administrator only to assign roles to managed identities. Include the Managed Services Registration Assignment Delete Role so the provider can remove its own access, and remember that the customer can always remove a delegation. - Google Cloud: restrict
roles/resourcemanager.organizationAdminand folder IAM admin roles; grants ofroles/iam.serviceAccountUserandroles/iam.serviceAccountTokenCreatoracross projects are effectively delegations of every permission the service account holds.
Cross-boundary privileged access should be just in time where the platform supports it, and owned by a named person on both sides. See the AWS IAM Policies and Roles Guide and the Azure RBAC and Service Principals Guide.
Integrations, API tokens and service accounts
Most cross-account and cross-tenant trust exists for machines: security scanners, backup services, SIEM collectors, CI pipelines and SaaS vendors. These are non-human identities with standing access into your environment, and they are where trust paths get abused.
| Integration pattern | Preferred mechanism | Controls that matter |
|---|---|---|
| SaaS vendor reading your AWS account | Cross-account role assumed by the vendor's account | sts:ExternalId generated by the vendor and unique per customer; read-only scoped policy; no long-lived access keys |
| AWS service writing to your bucket (logs, inventory) | Service principal in resource policy | aws:SourceAccount, aws:SourceArn or aws:SourceOrgID; enforce at scale with an RCP |
| Vendor app reading Microsoft 365 or Azure | Multitenant app with admin consent | Least privilege application permissions; owner and review date; monitor the service principal's sign-ins |
| Managed service provider operating Azure | Azure Lighthouse delegation | Built-in roles only, eligible (just in time) assignments where offered, delegation scoped to resource groups |
| Workload in one Google project using another project's data | Grant the workload's service account a role on the target resource | Avoid cross-project attachment unless needed; domain restriction; audit actAs |
| CI pipeline deploying into many accounts | Federated workload identity assuming a deployment role per account | Trust conditions on repository and branch claims; no stored keys |
Multitenant SaaS applications that authenticate into customer tenants with client secrets act with whatever permissions each customer granted, so review those grants and prefer federated credentials. See the Workload Identity Federation Guide and the Entra ID Applications and Consent Guide.
Choosing the mechanism
- Role assumption or resource policy (AWS): choose a cross-account role when the caller needs several actions across several resources and you want one place to audit; choose a resource policy when one external principal needs narrow access to one resource, such as a partner writing to a single bucket prefix.
- RAM or resource policy (AWS): use RAM for infrastructure that cannot carry a resource policy (subnets, Transit Gateways, resolver rules) and for organisation-wide sharing without invitations; its managed permission gives you a cap the consuming account cannot exceed.
- B2B collaboration, cross-tenant synchronisation or Lighthouse (Microsoft): B2B for people from other organisations; cross-tenant synchronisation for automatic provisioning between tenants your organisation owns; Lighthouse for a provider operating Azure resources, where no guest accounts are needed at all.
- Small and large estates: a small organisation with a handful of accounts and one MSP can manage trust paths in a spreadsheet reviewed quarterly; a large one needs the analysers above feeding a central register and policy guardrails that make unapproved paths impossible to create.
Logging and detection
- AWS CloudTrail:
AssumeRoleevents where the caller's account differs from the role's account (userIdentity.typeAWSAccountor a foreignaccountId);UpdateAssumeRolePolicy; RAMCreateResourceShare,AssociateResourceShareandAcceptResourceShareInvitation; resource policy writes such asPutBucketPolicyandPutKeyPolicy. - IAM Access Analyzer: an external access analyzer with the organisation as zone of trust reports resources shared outside it, across S3, IAM roles, KMS keys, Lambda, SQS, Secrets Manager, SNS, EBS and RDS snapshots, ECR, EFS and DynamoDB. Analysis is per Region, so enable an analyzer in each Region you use. Unused access analysis flags dormant roles, including cross-account roles nobody assumes. See the IAM Access Analyzer Guide.
- Entra ID: audit logs filtered by category
CrossTenantAccessSettingsfor configuration changes; sign-in logs showing cross-tenant access type; the cross-tenant access activity workbook. Sign-in logs may be retained for only 30 days, so export them to your SIEM. - Azure Activity Log: Lighthouse registration definitions and assignments (
Microsoft.ManagedServicesoperations) in delegated subscriptions. - Google Cloud: Admin Activity audit logs for
SetIamPolicyadding principals from other organisations;actAsuse, which Google records with the principal and attached service account; organisation policy changes to the constraints above.
| Metric | Target |
|---|---|
| Cross-boundary trust paths with a named owner and review date | 100% |
Third-party AWS roles requiring sts:ExternalId | 100% |
| Active Access Analyzer external access findings older than 30 days | Zero unarchived without a documented reason |
| Partner tenants with organisation-specific inbound settings | All tenants with regular access |
| Cross-account roles unused for 90 days | Removed or justified |
Hardening baseline
- Inventory trust paths: export role trust policies, resource policies, RAM shares, Entra cross-tenant organisational settings, multitenant service principals, Lighthouse delegations and cross-organisation IAM bindings. Record owner and purpose for each.
- Set the organisation boundary in policy: AWS RCPs enforcing
aws:PrincipalOrgIDwith explicit partner exceptions; Google domain restricted sharing; Entra default inbound settings restricted, with named partners added as organisational settings. - Fix third-party trust: require
sts:ExternalIdfor every vendor role; addaws:SourceOrgIDoraws:SourceAccountto service principal grants, centrally through an RCP where possible. - Restrict RAM: keep
allowExternalPrincipalsoff for shares that should stay inside the organisation and prefer customer managed permissions over broad AWS managed ones where the default grants more than needed. - Tighten Microsoft trust: trust MFA and device claims only from assessed partner tenants; enable tenant restrictions v2 on managed devices to stop users signing in to unknown tenants; scope cross-tenant synchronisation to the groups that need it.
- Review delegated roles: in Lighthouse and Google cross-project grants, check what the role can reach through key listing or impersonation, not only its name.
- Test before enforcing: review sign-in activity before blocking Entra defaults (Microsoft warns blocking can break business-critical access); deploy RCPs to a test OU first; roll back by detaching the policy or restoring the previous setting from exported configuration.
- Review quarterly: remove unused roles, expired partner settings and dormant delegations.
Common misconfigurations
- Trust policy naming an account root without conditions:
"Principal": {"AWS": "arn:aws:iam::111122223333:root"}lets any principal in that account the other side permits assume the role. Addsts:ExternalIdfor vendors oraws:PrincipalArnconditions for your own accounts. - Service principal grants without source conditions: a bucket that trusts a service principal without
aws:SourceAccountcan be written by that service on behalf of any account that knows its name. - Test and legacy tenants with a path into production: a test tenant account without MFA can lead to a legacy OAuth application with elevated access to the corporate environment.
- Trusting every partner's MFA: enabling inbound MFA trust in default settings extends your Conditional Access to whatever each external tenant accepts as MFA.
- Cross-tenant synchronisation used across organisations: the source becomes source of authority for every synced attribute, which Microsoft does not intend between separate companies.
- Forgotten delegations: Lighthouse delegations and vendor roles left in place after a contract ends, with nobody watching their activity.
Framework mapping
| Framework | Reference | Relevance |
|---|---|---|
| NIST SP 800-53 Rev. 5 | AC-20 Use of External Systems; AC-21 Information Sharing; CA-3 Information Exchange; SA-9 External System Services; AC-6 Least Privilege | Governing and limiting cross-boundary access |
| NIST CSF 2.0 | PR.AA-01; PR.AA-05; GV.SC-07; DE.CM-06 | Identity management, least privilege, third-party risk, monitoring provider activity |
| CIS Controls v8.1 | Control 6 Access Control Management; Control 15 Service Provider Management | Access grants and provider oversight |
| ISO/IEC 27001:2022 Annex A | 5.19 Information security in supplier relationships; 5.15 Access control; 5.18 Access rights | Supplier access and access rights reviews |
| MITRE ATT&CK v20 | T1199 Trusted Relationship; T1078.004 Cloud Accounts; T1098.003 Additional Cloud Roles; T1484.002 Trust Modification | Abuse of trust paths and their modification |
Practitioner checklist
- Maintain an inventory of every cross-account, cross-tenant and cross-organisation trust path with owner and purpose.
- Require
sts:ExternalIdon all third-party AWS roles and source conditions on all service principal grants. - Enforce the organisation boundary with RCPs on AWS and domain restricted sharing on Google Cloud.
- Restrict Entra ID default cross-tenant settings and configure named partners as organisational settings.
- Trust external MFA and device claims only for assessed partners.
- Use Azure Lighthouse with built-in, least privilege roles and include the delegation delete role.
- Run IAM Access Analyzer external access in every Region with the organisation as zone of trust.
- Alert on trust policy, resource share, cross-tenant setting and cross-organisation IAM binding changes.
- Remove unused cross-boundary roles and delegations every quarter.
Standards and references
- AWS: The confused deputy problem
- AWS: What is AWS Resource Access Manager?
- AWS: Using AWS IAM Access Analyzer
- Microsoft Learn: Cross-tenant access overview
- Microsoft Learn: What is cross-tenant synchronization?
- Microsoft Learn: Tenants, users and roles in Azure Lighthouse scenarios
- Google Cloud: Attach service accounts to resources
- MITRE ATT&CK: Trusted Relationship
Related NHI Mgmt Group resources: MITRE ATT&CK T1199 Trusted Relationship Guide · Entra ID Cross-Tenant Access and B2B Guest Governance Guide · AWS Resource Control Policies and Data Perimeter Guide · Cloud Data Perimeter Guide