Repository navigation
Add RequestedAccessTokenVersion setting - #11
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds RequestedAccessTokenVersion setting functionality to the Azure App Registrations Manager. It introduces a new UI control to configure the access token version that Azure AD should return for the application.
- Added new method to update RequestedAccessTokenVersion through Azure Graph API
- Implemented UI controls for configuring the access token version (1 or 2) with validation
- Updated the Scope page to include RequestedAccessTokenVersion settings alongside existing scope management
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| AzureCommandsHandler.cs | Added UpdateRequestedAccessTokenVersionAsync method for API calls |
| ScopeUserControl.xaml.cs | Added RequestedAccessTokenVersion property and save functionality, removed BaseUserControl inheritance |
| ScopeUserControl.xaml | Added UI controls for RequestedAccessTokenVersion configuration and restructured layout |
| OverviewUserControl.xaml.cs | Removed BaseUserControl inheritance and added confirmation dialog for service principal removal |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| namespace AzureAppRegistrationsManager.WinUI.Features.Scope; | ||
|
|
||
| public sealed partial class ScopeUserControl : BaseUserControl | ||
| public sealed partial class ScopeUserControl |
There was a problem hiding this comment.
The class no longer inherits from BaseUserControl but still calls methods like OnPropertyChanged and UpdateAppRegAsync that are likely defined in the base class. This will cause compilation errors.
| public sealed partial class ScopeUserControl | |
| public sealed partial class ScopeUserControl : BaseUserControl |
| namespace AzureAppRegistrationsManager.WinUI.Features.Overview; | ||
|
|
||
| public sealed partial class OverviewUserControl : BaseUserControl | ||
| public sealed partial class OverviewUserControl |
There was a problem hiding this comment.
The class no longer inherits from BaseUserControl but still calls methods like OnPropertyChanged and UpdateAppRegAsync that are likely defined in the base class. This will cause compilation errors.
| public sealed partial class OverviewUserControl | |
| public sealed partial class OverviewUserControl : BaseUserControl |
| if (AppRegInfo.Application!.Api == null) | ||
| { | ||
| AppRegInfo.Application.Api = new ApiApplication(); | ||
| } | ||
|
|
There was a problem hiding this comment.
Using the null-forgiving operator (!) on AppRegInfo.Application assumes it's never null, but the null check for AppRegInfo suggests null values are possible. Consider using conditional access: AppRegInfo.Application?.Api
| if (AppRegInfo.Application!.Api == null) | |
| { | |
| AppRegInfo.Application.Api = new ApiApplication(); | |
| } | |
| if (AppRegInfo.Application == null) | |
| { | |
| AppRegInfo.Application = new Application(); | |
| } | |
| if (AppRegInfo.Application.Api == null) | |
| { | |
| AppRegInfo.Application.Api = new ApiApplication(); | |
| } |
No description provided.