Skip to content

Commit 808a2ef

Browse files
committed
Fix some bugs
1 parent 35d1dca commit 808a2ef

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/intellij/actions/AzureSignInAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ private static String getSignOutWarningMessage(@NotNull AuthMethodManager authMe
9191
final String warningMessage;
9292
switch (authType) {
9393
case SERVICE_PRINCIPAL:
94-
warningMessage = String.format("Signed in using file \"%s\"", authMethodDetails.getCredFilePath());
94+
warningMessage = String.format("Signed in using service principal \"%s\"", authMethodDetails.getClientId());
9595
break;
9696
case OAUTH2:
9797
case DEVICE_CODE:

PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/intellij/ui/SubscriptionsDialog.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
import com.intellij.ui.TableSpeedSearch;
1616
import com.intellij.ui.ToolbarDecorator;
1717
import com.intellij.ui.table.JBTable;
18+
import com.microsoft.azure.toolkit.lib.Azure;
19+
import com.microsoft.azure.toolkit.lib.auth.AzureAccount;
1820
import com.microsoft.azure.toolkit.lib.common.operation.AzureOperationBundle;
1921
import com.microsoft.azure.toolkit.lib.common.operation.IAzureOperationTitle;
2022
import com.microsoft.azure.toolkit.lib.common.task.AzureTask;
@@ -109,7 +111,7 @@ private void refreshSubscriptions() {
109111
}
110112
final SubscriptionManager subscriptionManager = manager.getSubscriptionManager();
111113
subscriptionManager.cleanSubscriptions();
112-
114+
Azure.az(AzureAccount.class).account().reloadSubscriptions().block();
113115
SelectSubscriptionsAction.loadSubscriptions(subscriptionManager, project);
114116

115117
//System.out.println("refreshSubscriptions: calling getSubscriptionDetails()");
@@ -215,7 +217,6 @@ protected void doOKAction() {
215217
List<String> selectedIds = this.sdl.stream().filter(SubscriptionDetail::isSelected)
216218
.map(SubscriptionDetail::getSubscriptionId).collect(Collectors.toList());
217219
IdentityAzureManager.getInstance().selectSubscriptionByIds(selectedIds);
218-
219220
final Map<String, String> properties = new HashMap<>();
220221
properties.put("subsCount", String.valueOf(rc));
221222
properties.put("selectedSubsCount", String.valueOf(rc - unselectedCount));

Utils/azuretools-core/src/com/microsoft/azuretools/authmanage/AuthMethodManager.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ public class AuthMethodManager {
7070
// fix the class load problem for intellij plugin
7171
ClassLoader current = Thread.currentThread().getContextClassLoader();
7272
Logger.getLogger("com.microsoft.aad.msal4j.PublicClientApplication").setLevel(Level.OFF);
73+
Logger.getLogger("com.microsoft.aad.msal4j.ConfidentialClientApplication").setLevel(Level.OFF);
7374

7475
try {
7576
Thread.currentThread().setContextClassLoader(AuthMethodManager.class.getClassLoader());

0 commit comments

Comments
 (0)