Migrate All lab helper methods to Key Vault #5606
Draft
+13
−85
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.
Replace direct msidlab.com API calls with Key Vault data retrieval
Summary
Complete migration of MSAL.NET test infrastructure from direct msidlab.com API calls to Azure Key Vault-based data retrieval in preparation for API decommissioning. This migration improves test reliability, performance, and reduces external dependencies while maintaining full backward compatibility.
Changes proposed in this request
Key Vault Migration
GetB2CLocalAccountAsync()using Key Vault secretsB2C-User-IDLab-JSON,MSIDLABB2C,B2C-App-IDLABSAPPB2C-JSONGetArlingtonUserAsync()andGetArlingtonADFSUserAsync()using Key Vault secretsARL-User-IDLab-JSON,ARL-User-fIDLAB-JSON,ARLMSIDLAB1,ARL-App-IDLABSAPP-JSONGetCIAMUserAsync()method and migrated all 4 CIAM integration tests using Key Vault secretsMSAL-User-CIAM-JSON,MSIDLABCIAM6,MSAL-App-CIAM-JSONGetAdfsUserAsync()to existingGetDefaultAdfsUserAsync()methodInfrastructure Enhancements
MergeKVLabDataAsync()pattern for consistent multi-secret data merging across all authentication scenariosCode Cleanup
GetLabUserDataAsync,GetAdfsUserAsync,GetHybridSpaAccontAsyncs_userCache,ConcurrentDictionary)Testing
Validation Completed
GetB2CLocalAccountAsync()GetCIAMUserAsync()methodGetDefaultAdfsUserAsync()Test Coverage
Performance impact
Positive Improvements
Caching Strategy
Documentation
Updated Components
Migration Guide
GetAdfsUserAsync(FederationProvider.ADFSv4, true)→ After:GetDefaultAdfsUserAsync()MergeKVLabDataAsync("secret1", "secret2", "secret3")Fixes
Resolves infrastructure modernization requirements for msidlab.com API decommissioning while maintaining full test coverage and functionality across all MSAL.NET authentication scenarios.
Migration Status: 🟢 Complete - All msidlab.com user API dependencies successfully migrated to Key Vault-based approach.