Skip to content

Commit bd4b0b2

Browse files
Updates UWP tutorial based on author feedback
1 parent 20a187d commit bd4b0b2

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

articles/active-directory/develop/tutorial-v2-windows-uwp.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,9 @@ Eventually, the `AcquireTokenSilent` method fails. Reasons for failure include a
237237

238238
### Instantiate the Microsoft Graph Service Client by obtaining the token from the SignInUserAndGetTokenUsingMSAL method
239239

240-
In the project, create a new file named *TokenProvider.cs* with the following code:
240+
In the project, create a new file named *TokenProvider.cs*: right-click on the project, select **Add > New Item > Blank Page**.
241+
242+
Add to the newly created file the following code:
241243

242244
```csharp
243245
using Microsoft.Kiota.Abstractions.Authentication;
@@ -266,7 +268,10 @@ namespace UWP_app_MSGraph {
266268
}
267269
```
268270

269-
This class defines a custom access token provider that executes the specified delegate method to get and and return an access token.
271+
> [!TIP]
272+
> After pasting the code, make sure that the namespace in the *TokenProvider.cs* file, matches the namespace of your project. This will allow you to more easily reference the `TokenProvider` class in your project.
273+
274+
The `TokenProvider` class defines a custom access token provider that executes the specified delegate method to get and and return an access token.
270275

271276
Add the following new method to *MainPage.xaml.cs*:
272277

0 commit comments

Comments
 (0)