diff --git a/src/client/Microsoft.Identity.Client/Platforms/Features/WinFormsLegacyWebUi/WindowsFormsWebAuthenticationDialogBase.cs b/src/client/Microsoft.Identity.Client/Platforms/Features/WinFormsLegacyWebUi/WindowsFormsWebAuthenticationDialogBase.cs index 81dd7d42de..b3b75a10be 100644 --- a/src/client/Microsoft.Identity.Client/Platforms/Features/WinFormsLegacyWebUi/WindowsFormsWebAuthenticationDialogBase.cs +++ b/src/client/Microsoft.Identity.Client/Platforms/Features/WinFormsLegacyWebUi/WindowsFormsWebAuthenticationDialogBase.cs @@ -205,7 +205,7 @@ private bool CheckForClosingUrl(Uri url, byte[] postData = null) url.AbsolutePath.Equals(_desiredCallbackUri.AbsolutePath)) { RequestContext.Logger.Info("[Legacy WebView] Redirect URI was reached. Stopping WebView navigation..."); - Result = AuthorizationResult.FromPostData(postData); + Result = postData != null ? AuthorizationResult.FromPostData(postData) : AuthorizationResult.FromUri(url.OriginalString); readyToClose = true; }