Using the ADAL library to get the token for WAAD, I would like to know how I can get more control over the input stream.
var ac = new AuthenticationContext("https://login.windows.net/" + ActiveDirectoryTenantId);
AuthenticationInfo = ac.AcquireToken(
resource: "https://management.core.windows.net/",
clientId: "1950a258-227b-4e31-a9cf-717495945fc2",
redirectUri: new Uri("urn:ietf:wg:oauth:2.0:oob"));
The user will be prompted to log in. For me it is through Live Id, for my client computer it is through an organizational account, and there is no way to switch between them. It seems that it is controlled by how / which current sessions that the computer could start have already entered the azure.
Can I do something in an AcquireToken call to control this? It would be better if I could initiate a normal flow when people enter Azure, where they can choose whether there will be a live identifier or organizational login.
I tried this:
ac.AcquireToken("https://management.core.windows.net/",
"1950a258-227b-4e31-a9cf-717495945fc2",
new Uri("urn:ietf:wg:oauth:2.0:oob"), PromptBehavior.Always,"wtrealm=urn:federation:MicrosoftOnline");
no luck.