Skip to content

Commit

Permalink
Updating the authority to use the new one.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmprieur committed Jun 26, 2017
1 parent 003a3fd commit 4c59fa6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions DirectorySearcherLib/DirectorySearcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace DirectorySearcherLib
public static class DirectorySearcher
{
public static string clientId = "a5d92493-ae5a-4a9f-bcbf-9f1d354067d3";
public static string commonAuthority = "https://login.windows.net/common";
public static string commonAuthority = "https://login.microsoftonline.com/common/";
public static Uri returnUri = new Uri("http://MyDirectorySearcherApp");
const string graphResourceUri = "https://graph.windows.net";
public static string graphApiVersion = "2013-11-08";
Expand All @@ -30,7 +30,7 @@ public static async Task<List<User>> SearchByAlias(string alias, IPlatformParame
{
// To avoid the user consent page, input the values for your registered application above,
// comment out the if statement immediately below, and replace the commonAuthority parameter
// with https://login.windows.net/<your.tenant.domain.com>
// with https://login.microsoftonline.com/common/<your.tenant.domain.com>
AuthenticationContext authContext = new AuthenticationContext(commonAuthority);
if (authContext.TokenCache.ReadItems().Count() > 0)
authContext = new AuthenticationContext(authContext.TokenCache.ReadItems().First().Authority);
Expand Down

0 comments on commit 4c59fa6

Please sign in to comment.