Explore Courses Blog Tutorials Interview Questions
0 votes
in Azure by (13.1k points)
I have a web application which will redirected to the Azure login page whenever any user visit it, and once he logged in it he can able to access it. Is there any way I can achieve it using a console application?

Can anyone help me with this?

1 Answer

0 votes
by (26.7k points)

The below code will help you with the login account to choose by the user:

using Microsoft.Identity.Client;

var app =new PublicClientApplication("YOUR_CLIENT_ID");

var accounts = app.AcquireTokenAsync(scopes).Result;

I hope this will help.

Want to become an Azure expert? join azure certification now!!

Browse Categories