private void WriteOrThrowAadExceptionMessage(AadAuthenticationException aadEx) { if (aadEx is AadAuthenticationFailedWithoutPopupException) { WriteDebugMessage(aadEx.Message); } else if (aadEx is AadAuthenticationCanceledException) { WriteWarningMessage(aadEx.Message); } else { throw aadEx; } }
private void ThrowTenantAuthenticationError(string tenant, AadAuthenticationException exception) { throw new PSArgumentException(string.Format(Resources.TenantAuthFailed, tenant), exception); }