Repository navigation
Fix Entra ID settings not saved when authorization fails - #3953
Draft
karmegams02 wants to merge 4 commits into
Draft
karmegams02 wants to merge 4 commits into
karmegams02 wants to merge 4 commits into
Conversation
…o EntraID_3092145 # Conflicts: # test/dotnet-scaffolding/dotnet-scaffold.Tests/AspNet/Integration/EntraId/EntraIdTenantIdentityPipelineTests.cs
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the change to persist existing application settings before authorization.
No open issues 🎉
What changed in this PR
This PR updates the Entra ID scaffolding pipeline so settings for existing applications are saved before authorization, preserving them if authorization fails. New applications retain settings persistence after authorization and secret creation.
Changes:
- Add registration-mode filtering to the settings step.
- Schedule settings updates separately for existing and new applications.
- Extend pipeline tests for persistence, failure handling, and exactly-once settings execution.
| File | Description |
|---|---|
| test/dotnet-scaffolding/dotnet-scaffold.Tests/AspNet/Integration/EntraId/EntraIdTenantIdentityPipelineTests.cs | Adds persistence and failure-path tests; updates ordering and identity-mismatch coverage. |
| src/dotnet-scaffolding/dotnet-scaffold/AspNet/Extensions/BlazorEntraScaffolderBuilderExtensions.cs | Adds an optional registration-mode filter to the settings step. |
| src/dotnet-scaffolding/dotnet-scaffold/AspNet/AspNetCommandService.cs | Places settings updates before authorization for existing applications and after secret creation for new applications. |
Review effort: Balanced
…o EntraID_3092145 # Conflicts: # src/dotnet-scaffolding/dotnet-scaffold/AspNet/AspNetCommandService.cs # test/dotnet-scaffolding/dotnet-scaffold.Tests/AspNet/Integration/EntraId/EntraIdTenantIdentityPipelineTests.cs
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.
Description:
Save settings for an existing Entra ID application before running the authorization step.
Rootcause:
The authorization step ran before saving settings. If authorization failed, the process stopped without saving the settings.
Before fix:
Settings were not saved when authorization failed, even when using an existing application.
After fix:
Test:
All 8 tests passed. The tests use the real scaffolding runner and check: