Skip to content

Commit

Permalink
Switch to new App Id
Browse files Browse the repository at this point in the history
  • Loading branch information
David-Engel committed Jun 1, 2020
1 parent b15032c commit 3d226d4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1137,7 +1137,7 @@ internal enum TransparentNetworkResolutionState

internal class ActiveDirectoryAuthentication
{
internal const string AdoClientId = "4d079b4c-cab7-4b7c-a115-8fd51b6f8239";
internal const string AdoClientId = "2fd908ad-0664-4344-b9be-cd3e8b574c38";
internal const string MSALGetAccessTokenFunctionName = "AcquireToken";
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1102,7 +1102,7 @@ internal enum TransparentNetworkResolutionState

internal class ActiveDirectoryAuthentication
{
internal const string AdoClientId = "4d079b4c-cab7-4b7c-a115-8fd51b6f8239";
internal const string AdoClientId = "2fd908ad-0664-4344-b9be-cd3e8b574c38";
internal const string MSALGetAccessTokenFunctionName = "AcquireToken";
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,18 @@ public override Task<SqlAuthenticationToken> AcquireTokenAsync(SqlAuthentication
.WithAuthority(parameters.Authority)
.WithClientName(Common.DbConnectionStringDefaults.ApplicationName)
.WithClientVersion(Common.ADP.GetAssemblyVersion().ToString())
#if netcoreapp
.WithRedirectUri("http://localhost")
#else
/*
* Today, MSAL.NET uses another redirect URI by default in desktop applications that run on Windows
* (urn:ietf:wg:oauth:2.0:oob). In the future, we'll want to change this default, so we recommend
* that you use https://login.microsoftonline.com/common/oauth2/nativeclient.
*
* https://docs.microsoft.com/en-us/azure/active-directory/develop/scenario-desktop-app-registration#redirect-uris
*/
.WithRedirectUri("https://login.microsoftonline.com/oauth2/nativeclient")
#endif
.Build();

if (parameters.AuthenticationMethod == SqlAuthenticationMethod.ActiveDirectoryIntegrated)
Expand Down

0 comments on commit 3d226d4

Please sign in to comment.