Skip to content

Update tutorial-desktop-wpf-dotnet-sign-in-build-app.md #1657

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ dotnet add package Microsoft.Identity.Client.Broker
- Replace `Enter_the_Application_Id_Here` with the Application (client) ID of the app you registered earlier.

1. After creating the app settings file, we'll create another file called *AzureAdConfig.cs* that will help you read the configs from the app settings file. Create the *AzureAdConfig.cs* file in the root folder of the app.
1. In the *AzureAdConfig.js* file, define the getters and setters for the `ClientId` and `Authority` properties. Add the following code:
1. In the *AzureAdConfig.cs* file, define the getters and setters for the `ClientId` and `Authority` properties. Add the following code:

```csharp
namespace sign_in_dotnet_wpf
Expand Down Expand Up @@ -306,7 +306,7 @@ The *MainWindow.xaml.cs* file contains the code that provides th runtime logic f
authResult = await app.AcquireTokenSilent(scopes, firstAccount)
.ExecuteAsync();
}
catch (MsalUiRequiredException ex)
catch (MsalUiRequiredException msalUiEx)
{
try
{
Expand All @@ -316,9 +316,9 @@ The *MainWindow.xaml.cs* file contains the code that provides th runtime logic f
.WithPrompt(Prompt.SelectAccount)
.ExecuteAsync();
}
catch (MsalException msalex)
catch (MsalException msalEx)
{
ResultText.Text = $"Error Acquiring Token:{System.Environment.NewLine}{msalex}";
ResultText.Text = $"Error Acquiring Token:{System.Environment.NewLine}{msalEx}";
}
catch (Exception ex)
{
Expand Down