Skip to content

Add Defender permissions part of "a365 setup all" - #485

Draft
Slava Reznitsky (slreznit) wants to merge 3 commits into
mainfrom
slreznit/defender
Draft

Add Defender permissions part of "a365 setup all"#485
Slava Reznitsky (slreznit) wants to merge 3 commits into
mainfrom
slreznit/defender

Conversation

@slreznit

Copy link
Copy Markdown

Summary

  • Grant the Defender API AIAgentsRTP.ToolInvocation permission during a365 setup for both delegated (OBO) and application (S2S) flows.
  • Include Defender in individual and combined admin-consent URLs, setup output, and persisted resource-consent tracking.
  • Use the Defender API's HTTPS identifier URI and preserve its public app ID in redacted logs.
  • Document how existing agents can obtain the required Defender permission.

Testing

  • Added regression coverage for Defender permission specs, admin-consent instructions, and individual/combined consent URLs.
  • Tests not run locally.

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown

⚠️ Deprecation Warning: The deny-licenses option is deprecated for possible removal in the next major release. For more information, see issue 997.

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Aug 9, 2026
Updates the Defender API app role and delegated scope value from
AIAgentsRTP.ToolInvocation to RealtimeProtection.Process, and renames the
constant accordingly since the old name no longer described the role.

NOT YET VERIFIED AGAINST A LIVE RESOURCE. The resource SP still publishes
AIAgentsRTP.ToolInvocation in the agent365003 tenant, and the resource is not
provisioned in the corp tenant at all, so the new value could not be confirmed
anywhere. Until the Defender-side rename ships, the combined /v2.0/adminconsent
URL will fail with AADSTS650053 for every resource in the request - Graph, MCP,
Bot, Observability and Power Platform - not just Defender, and the S2S app role
lookup will find no matching appRoles entry. Confirm the resource publishes the
new value before merging.

Adds DefenderApi_ScopeValue_MatchesValuePublishedOnResource pinning the literal
string so future drift fails a test that explains the blast radius.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
/// <summary>
/// Defender API identifier URI.
/// </summary>
public const string DefenderApiIdentifierUri = "https://rtp-a365.ai.defender.microsoft.com";

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will replace with api://86a21212-634e-4553-b3d6-e477e4c9d9ec

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant