Skip to content
This repository was archived by the owner on Jan 19, 2021. It is now read-only.

Commit 6256dc6

Browse files
committed
fixed compilation issue for on-prem
1 parent 818f5e2 commit 6256dc6

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Commands/Base/ConnectOnline.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,8 @@ private void WriteUpdateMessage(string message)
594594
outMessage += $"{notificationColor} {lineToAdd} {resetColor}\n";
595595
}
596596
Host.UI.WriteLine(outMessage);
597-
} else
597+
}
598+
else
598599
{
599600
WriteWarning(message);
600601
}
@@ -620,7 +621,11 @@ protected void Connect()
620621
SPOnlineConnection connection = null;
621622
if (ParameterSetName == ParameterSet_TOKEN)
622623
{
624+
#if !ONPREMISES
623625
connection = SPOnlineConnectionHelper.InstantiateSPOnlineConnection(new Uri(Url), Realm, AppId, AppSecret, Host, MinimalHealthScore, RetryCount, RetryWait, RequestTimeout, TenantAdminUrl, SkipTenantAdminCheck, false, AzureEnvironment);
626+
#else
627+
connection = SPOnlineConnectionHelper.InstantiateSPOnlineConnection(new Uri(Url), Realm, AppId, AppSecret, Host, MinimalHealthScore, RetryCount, RetryWait, RequestTimeout, TenantAdminUrl, SkipTenantAdminCheck, false);
628+
#endif
624629
}
625630
else if (UseWebLogin)
626631
{
@@ -734,7 +739,7 @@ protected void Connect()
734739
connection = SPOnlineConnectionHelper.InitiateAzureADAppOnlyConnection(new Uri(Url), ClientId, Tenant, Certificate, MinimalHealthScore, RetryCount, RetryWait, RequestTimeout, TenantAdminUrl, Host, NoTelemetry, SkipTenantAdminCheck, AzureEnvironment);
735740
#else
736741
throw new NotImplementedException();
737-
#endif
742+
#endif
738743
}
739744
#if !NETSTANDARD2_1
740745
else if (ParameterSetName == ParameterSet_GRAPHWITHSCOPE)

0 commit comments

Comments
 (0)