Use app acquisition for EasyAuth app authentication results - #4015
Merged
Nilesh Choudhary (4gust) merged 5 commits intoSep 8, 2026
Merged
Nilesh Choudhary (4gust) merged 5 commits into
Nilesh Choudhary (4gust) merged 5 commits into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Enforces constraints on EasyAuth-provided user tokens while preserving unconstrained opaque-token behavior.
Changes:
- Validates explicit tenant, audience, and delegated scopes.
- Adds sovereign-cloud Microsoft Graph alias handling.
- Separates app-token and user-token result behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/Microsoft.Identity.Web/AppServicesAuth/AppServicesAuthenticationTokenAcquisition.cs |
Implements token constraints and tenant-aware app acquisition. |
tests/Microsoft.Identity.Web.Test/AppServicesAuthenticationTokenAcquisitionTests.cs |
Adds focused EasyAuth behavior tests. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Nilesh Choudhary (4gust)
approved these changes
Sep 1, 2026
Bogdan Gavril (bgavrilMS)
requested changes
Sep 2, 2026
Bogdan Gavril (bgavrilMS)
left a comment
Member
There was a problem hiding this comment.
Clients MUST not parse tokens.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
I tested the manually and the fix works. |
Bogdan Gavril (bgavrilMS)
approved these changes
Sep 8, 2026
Nilesh Choudhary (4gust)
deleted the
iinglese/easyauth-contract-validation-minimal
branch
September 8, 2026 15:35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Release notes
EasyAuth
GetAuthenticationResultForAppAsyncnow performs client-credential acquisition and returns an app-only authentication result instead of the provider token associated with the signed-in user. Applications using this method must have valid application credentials and the required application permissions.EasyAuth user-token behavior is unchanged. User-token methods continue to return the provider token supplied by App Services authentication for the current request.
Testing
AppServicesAuthenticationTokenAcquisitionTestspassed on .NET 8.