Created
April 19, 2023 12:22
-
-
Save cjvandyk/49c9e5b467d2e9e38bb4f3bd14f71a26 to your computer and use it in GitHub Desktop.
MSAL in C#
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
| string[] scopes = { "user.read" }; | |
| string clientId = "your-client-id"; | |
| string redirectUri = "http://localhost/myapp"; | |
| IPublicClientApplication app = PublicClientApplicationBuilder | |
| .Create(clientId) | |
| .WithRedirectUri(redirectUri) | |
| .Build(); | |
| AuthenticationResult result = await app.AcquireTokenInteractive(scopes) | |
| .ExecuteAsync(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment