-
Notifications
You must be signed in to change notification settings - Fork 122
Network-25378: External collaboration is governed by explicit Cross-Tenant Access Policies #777
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request adds a new assessment test (25378) to validate that external collaboration is governed by explicit Cross-Tenant Access Policies in Microsoft Entra ID. The test ensures that default outbound B2B collaboration settings block all users and all applications, requiring organizations to explicitly define cross-tenant access policies for external collaboration.
Changes:
- Adds Test-Assessment.25378.ps1 implementing the assessment logic for Cross-Tenant Access Policy validation
- Adds Test-Assessment.25378.md providing risk context and remediation guidance
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| src/powershell/tests/Test-Assessment.25378.ps1 | New PowerShell assessment test that validates Cross-Tenant Access Policy default outbound settings block all users and applications |
| src/powershell/tests/Test-Assessment.25378.md | Documentation explaining security risks of unrestricted B2B collaboration and remediation steps |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # Summary Section | ||
| $mdInfo += "`n## [Default Cross-Tenant Access Settings - Outbound B2B Collaboration]($portalLink)`n`n" | ||
| $mdInfo += "| Setting | Configured Value | Expected Value | Status |`n" | ||
| $mdInfo += "| :--- | :--- | :--- | :---: |`n" | ||
| $mdInfo += "| Is Service Default | $isServiceDefaultStr | false | $isServiceDefaultStatus |`n" | ||
| $mdInfo += "| Users and Groups Access Type | $usersAndGroupsAccessType | blocked | $usersAccessStatus |`n" | ||
| $mdInfo += "| Users and Groups Target | $($usersAndGroupsTargets[0]) | AllUsers | $usersTargetStatus |`n" | ||
| $mdInfo += "| Applications Access Type | $applicationsAccessType | blocked | $appsAccessStatus |`n" | ||
| $mdInfo += "| Applications Target | $($applicationsTargets[0]) | AllApplications | $appsTargetStatus |`n" |
Copilot
AI
Jan 16, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Accessing array index [0] directly could fail if the array is empty. While $usersAndGroupsTargets is initialized with @('N/A'), if it's reassigned on line 76 with an empty array from $b2bOutbound.usersAndGroups.targets.target, this would cause an index out of bounds error. Add a check or use a safer accessor pattern.
| # Summary Section | |
| $mdInfo += "`n## [Default Cross-Tenant Access Settings - Outbound B2B Collaboration]($portalLink)`n`n" | |
| $mdInfo += "| Setting | Configured Value | Expected Value | Status |`n" | |
| $mdInfo += "| :--- | :--- | :--- | :---: |`n" | |
| $mdInfo += "| Is Service Default | $isServiceDefaultStr | false | $isServiceDefaultStatus |`n" | |
| $mdInfo += "| Users and Groups Access Type | $usersAndGroupsAccessType | blocked | $usersAccessStatus |`n" | |
| $mdInfo += "| Users and Groups Target | $($usersAndGroupsTargets[0]) | AllUsers | $usersTargetStatus |`n" | |
| $mdInfo += "| Applications Access Type | $applicationsAccessType | blocked | $appsAccessStatus |`n" | |
| $mdInfo += "| Applications Target | $($applicationsTargets[0]) | AllApplications | $appsTargetStatus |`n" | |
| $usersAndGroupsTargetDisplay = if ($null -ne $usersAndGroupsTargets -and $usersAndGroupsTargets.Count -gt 0) { $usersAndGroupsTargets[0] } else { 'N/A' } | |
| $applicationsTargetDisplay = if ($null -ne $applicationsTargets -and $applicationsTargets.Count -gt 0) { $applicationsTargets[0] } else { 'N/A' } | |
| # Summary Section | |
| $mdInfo += "`n## [Default Cross-Tenant Access Settings - Outbound B2B Collaboration]($portalLink)`n`n" | |
| $mdInfo += "| Setting | Configured Value | Expected Value | Status |`n" | |
| $mdInfo += "| :--- | :--- | :--- | :---: |`n" | |
| $mdInfo += "| Is Service Default | $isServiceDefaultStr | false | $isServiceDefaultStatus |`n" | |
| $mdInfo += "| Users and Groups Access Type | $usersAndGroupsAccessType | blocked | $usersAccessStatus |`n" | |
| $mdInfo += "| Users and Groups Target | $usersAndGroupsTargetDisplay | AllUsers | $usersTargetStatus |`n" | |
| $mdInfo += "| Applications Access Type | $applicationsAccessType | blocked | $appsAccessStatus |`n" | |
| $mdInfo += "| Applications Target | $applicationsTargetDisplay | AllApplications | $appsTargetStatus |`n" |
| $mdInfo += "| Users and Groups Access Type | $usersAndGroupsAccessType | blocked | $usersAccessStatus |`n" | ||
| $mdInfo += "| Users and Groups Target | $($usersAndGroupsTargets[0]) | AllUsers | $usersTargetStatus |`n" | ||
| $mdInfo += "| Applications Access Type | $applicationsAccessType | blocked | $appsAccessStatus |`n" | ||
| $mdInfo += "| Applications Target | $($applicationsTargets[0]) | AllApplications | $appsTargetStatus |`n" |
Copilot
AI
Jan 16, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to line 140, accessing array index [0] directly could fail if the array becomes empty after reassignment on line 86. Add a check or use a safer accessor pattern to prevent potential index out of bounds errors.
| - [Use the cross-tenant access activity workbook to identify current external collaboration patterns before blocking default access:]( https://learn.microsoft.com/en-us/entra/identity/monitoring-health/workbook-cross-tenant-access-activity) | ||
| - [Configure default outbound B2B collaboration settings to block access in the Microsoft Entra admin center:]( https://learn.microsoft.com/en-us/entra/external-id/cross-tenant-access-settings-b2b-collaboration#modify-outbound-access-settings) | ||
| - [Add organization-specific settings for approved partner tenants that require B2B collaboration:]( https://learn.microsoft.com/en-us/entra/external-id/cross-tenant-access-settings-b2b-collaboration#add-an-organization) | ||
| - [Update default cross-tenant access policy via Microsoft Graph API:]( https://learn.microsoft.com/en-us/graph/api/crosstenantaccesspolicyconfigurationdefault-update) |
Copilot
AI
Jan 16, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is an extra space between the closing bracket and opening parenthesis in the markdown link syntax. It should be ](https:// not ]( https:// to ensure the link renders correctly.
| - [Use the cross-tenant access activity workbook to identify current external collaboration patterns before blocking default access:]( https://learn.microsoft.com/en-us/entra/identity/monitoring-health/workbook-cross-tenant-access-activity) | |
| - [Configure default outbound B2B collaboration settings to block access in the Microsoft Entra admin center:]( https://learn.microsoft.com/en-us/entra/external-id/cross-tenant-access-settings-b2b-collaboration#modify-outbound-access-settings) | |
| - [Add organization-specific settings for approved partner tenants that require B2B collaboration:]( https://learn.microsoft.com/en-us/entra/external-id/cross-tenant-access-settings-b2b-collaboration#add-an-organization) | |
| - [Update default cross-tenant access policy via Microsoft Graph API:]( https://learn.microsoft.com/en-us/graph/api/crosstenantaccesspolicyconfigurationdefault-update) | |
| - [Use the cross-tenant access activity workbook to identify current external collaboration patterns before blocking default access:](https://learn.microsoft.com/en-us/entra/identity/monitoring-health/workbook-cross-tenant-access-activity) | |
| - [Configure default outbound B2B collaboration settings to block access in the Microsoft Entra admin center:](https://learn.microsoft.com/en-us/entra/external-id/cross-tenant-access-settings-b2b-collaboration#modify-outbound-access-settings) | |
| - [Add organization-specific settings for approved partner tenants that require B2B collaboration:](https://learn.microsoft.com/en-us/entra/external-id/cross-tenant-access-settings-b2b-collaboration#add-an-organization) | |
| - [Update default cross-tenant access policy via Microsoft Graph API:](https://learn.microsoft.com/en-us/graph/api/crosstenantaccesspolicyconfigurationdefault-update) |
| - [Use the cross-tenant access activity workbook to identify current external collaboration patterns before blocking default access:]( https://learn.microsoft.com/en-us/entra/identity/monitoring-health/workbook-cross-tenant-access-activity) | ||
| - [Configure default outbound B2B collaboration settings to block access in the Microsoft Entra admin center:]( https://learn.microsoft.com/en-us/entra/external-id/cross-tenant-access-settings-b2b-collaboration#modify-outbound-access-settings) | ||
| - [Add organization-specific settings for approved partner tenants that require B2B collaboration:]( https://learn.microsoft.com/en-us/entra/external-id/cross-tenant-access-settings-b2b-collaboration#add-an-organization) | ||
| - [Update default cross-tenant access policy via Microsoft Graph API:]( https://learn.microsoft.com/en-us/graph/api/crosstenantaccesspolicyconfigurationdefault-update) |
Copilot
AI
Jan 16, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is an extra space between the closing bracket and opening parenthesis in the markdown link syntax. It should be ](https:// not ]( https:// to ensure the link renders correctly.
| - [Use the cross-tenant access activity workbook to identify current external collaboration patterns before blocking default access:]( https://learn.microsoft.com/en-us/entra/identity/monitoring-health/workbook-cross-tenant-access-activity) | |
| - [Configure default outbound B2B collaboration settings to block access in the Microsoft Entra admin center:]( https://learn.microsoft.com/en-us/entra/external-id/cross-tenant-access-settings-b2b-collaboration#modify-outbound-access-settings) | |
| - [Add organization-specific settings for approved partner tenants that require B2B collaboration:]( https://learn.microsoft.com/en-us/entra/external-id/cross-tenant-access-settings-b2b-collaboration#add-an-organization) | |
| - [Update default cross-tenant access policy via Microsoft Graph API:]( https://learn.microsoft.com/en-us/graph/api/crosstenantaccesspolicyconfigurationdefault-update) | |
| - [Use the cross-tenant access activity workbook to identify current external collaboration patterns before blocking default access:](https://learn.microsoft.com/en-us/entra/identity/monitoring-health/workbook-cross-tenant-access-activity) | |
| - [Configure default outbound B2B collaboration settings to block access in the Microsoft Entra admin center:](https://learn.microsoft.com/en-us/entra/external-id/cross-tenant-access-settings-b2b-collaboration#modify-outbound-access-settings) | |
| - [Add organization-specific settings for approved partner tenants that require B2B collaboration:](https://learn.microsoft.com/en-us/entra/external-id/cross-tenant-access-settings-b2b-collaboration#add-an-organization) | |
| - [Update default cross-tenant access policy via Microsoft Graph API:](https://learn.microsoft.com/en-us/graph/api/crosstenantaccesspolicyconfigurationdefault-update) |
| - [Use the cross-tenant access activity workbook to identify current external collaboration patterns before blocking default access:]( https://learn.microsoft.com/en-us/entra/identity/monitoring-health/workbook-cross-tenant-access-activity) | ||
| - [Configure default outbound B2B collaboration settings to block access in the Microsoft Entra admin center:]( https://learn.microsoft.com/en-us/entra/external-id/cross-tenant-access-settings-b2b-collaboration#modify-outbound-access-settings) | ||
| - [Add organization-specific settings for approved partner tenants that require B2B collaboration:]( https://learn.microsoft.com/en-us/entra/external-id/cross-tenant-access-settings-b2b-collaboration#add-an-organization) | ||
| - [Update default cross-tenant access policy via Microsoft Graph API:]( https://learn.microsoft.com/en-us/graph/api/crosstenantaccesspolicyconfigurationdefault-update) |
Copilot
AI
Jan 16, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is an extra space between the closing bracket and opening parenthesis in the markdown link syntax. It should be ](https:// not ]( https:// to ensure the link renders correctly.
| - [Use the cross-tenant access activity workbook to identify current external collaboration patterns before blocking default access:]( https://learn.microsoft.com/en-us/entra/identity/monitoring-health/workbook-cross-tenant-access-activity) | |
| - [Configure default outbound B2B collaboration settings to block access in the Microsoft Entra admin center:]( https://learn.microsoft.com/en-us/entra/external-id/cross-tenant-access-settings-b2b-collaboration#modify-outbound-access-settings) | |
| - [Add organization-specific settings for approved partner tenants that require B2B collaboration:]( https://learn.microsoft.com/en-us/entra/external-id/cross-tenant-access-settings-b2b-collaboration#add-an-organization) | |
| - [Update default cross-tenant access policy via Microsoft Graph API:]( https://learn.microsoft.com/en-us/graph/api/crosstenantaccesspolicyconfigurationdefault-update) | |
| - [Use the cross-tenant access activity workbook to identify current external collaboration patterns before blocking default access:](https://learn.microsoft.com/en-us/entra/identity/monitoring-health/workbook-cross-tenant-access-activity) | |
| - [Configure default outbound B2B collaboration settings to block access in the Microsoft Entra admin center:](https://learn.microsoft.com/en-us/entra/external-id/cross-tenant-access-settings-b2b-collaboration#modify-outbound-access-settings) | |
| - [Add organization-specific settings for approved partner tenants that require B2B collaboration:](https://learn.microsoft.com/en-us/entra/external-id/cross-tenant-access-settings-b2b-collaboration#add-an-organization) | |
| - [Update default cross-tenant access policy via Microsoft Graph API:](https://learn.microsoft.com/en-us/graph/api/crosstenantaccesspolicyconfigurationdefault-update) |
| - [Use the cross-tenant access activity workbook to identify current external collaboration patterns before blocking default access:]( https://learn.microsoft.com/en-us/entra/identity/monitoring-health/workbook-cross-tenant-access-activity) | ||
| - [Configure default outbound B2B collaboration settings to block access in the Microsoft Entra admin center:]( https://learn.microsoft.com/en-us/entra/external-id/cross-tenant-access-settings-b2b-collaboration#modify-outbound-access-settings) | ||
| - [Add organization-specific settings for approved partner tenants that require B2B collaboration:]( https://learn.microsoft.com/en-us/entra/external-id/cross-tenant-access-settings-b2b-collaboration#add-an-organization) | ||
| - [Update default cross-tenant access policy via Microsoft Graph API:]( https://learn.microsoft.com/en-us/graph/api/crosstenantaccesspolicyconfigurationdefault-update) |
Copilot
AI
Jan 16, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is an extra space between the closing bracket and opening parenthesis in the markdown link syntax. It should be ](https:// not ]( https:// to ensure the link renders correctly.
| - [Use the cross-tenant access activity workbook to identify current external collaboration patterns before blocking default access:]( https://learn.microsoft.com/en-us/entra/identity/monitoring-health/workbook-cross-tenant-access-activity) | |
| - [Configure default outbound B2B collaboration settings to block access in the Microsoft Entra admin center:]( https://learn.microsoft.com/en-us/entra/external-id/cross-tenant-access-settings-b2b-collaboration#modify-outbound-access-settings) | |
| - [Add organization-specific settings for approved partner tenants that require B2B collaboration:]( https://learn.microsoft.com/en-us/entra/external-id/cross-tenant-access-settings-b2b-collaboration#add-an-organization) | |
| - [Update default cross-tenant access policy via Microsoft Graph API:]( https://learn.microsoft.com/en-us/graph/api/crosstenantaccesspolicyconfigurationdefault-update) | |
| - [Use the cross-tenant access activity workbook to identify current external collaboration patterns before blocking default access:](https://learn.microsoft.com/en-us/entra/identity/monitoring-health/workbook-cross-tenant-access-activity) | |
| - [Configure default outbound B2B collaboration settings to block access in the Microsoft Entra admin center:](https://learn.microsoft.com/en-us/entra/external-id/cross-tenant-access-settings-b2b-collaboration#modify-outbound-access-settings) | |
| - [Add organization-specific settings for approved partner tenants that require B2B collaboration:](https://learn.microsoft.com/en-us/entra/external-id/cross-tenant-access-settings-b2b-collaboration#add-an-organization) | |
| - [Update default cross-tenant access policy via Microsoft Graph API:](https://learn.microsoft.com/en-us/graph/api/crosstenantaccesspolicyconfigurationdefault-update) |
External collaboration is governed by explicit Cross-Tenant Access Policies