private PnPConnection ConnectWebLogin() { if (Utilities.OperatingSystem.IsWindows()) { return(PnPConnectionHelper.InstantiateWebloginConnection(new Uri(Url.ToLower()), TenantAdminUrl, ForceAuthentication)); } else { throw new PSArgumentException("-UseWebLogin only works when running on Microsoft Windows due to the requirement to show a login window."); } }
private PnPConnection ConnectWebLogin() { WriteWarning("Consider using -Interactive instead, which provides better functionality. See the documentation at https://pnp.github.io/powershell/cmdlets/connect-pnponline.html#interactive-login-for-multi-factor-authentication"); if (Utilities.OperatingSystem.IsWindows()) { return(PnPConnectionHelper.InstantiateWebloginConnection(new Uri(Url.ToLower()), TenantAdminUrl, ForceAuthentication)); } else { throw new PSArgumentException("-UseWebLogin only works when running on Microsoft Windows due to the requirement to show a login window."); } }