From 400dbe8076e84a238dd40f7cd1c22e043cd08cbd Mon Sep 17 00:00:00 2001 From: Sailesh Baidya <34048254+saileshbaidya@users.noreply.github.com> Date: Sat, 23 Sep 2023 15:38:31 -0700 Subject: [PATCH] Update core/src/main/scala/com/microsoft/azure/synapse/ml/logging/Usage/TokenUtils.scala Co-authored-by: Mark Hamilton --- .../microsoft/azure/synapse/ml/logging/Usage/TokenUtils.scala | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/src/main/scala/com/microsoft/azure/synapse/ml/logging/Usage/TokenUtils.scala b/core/src/main/scala/com/microsoft/azure/synapse/ml/logging/Usage/TokenUtils.scala index 06fa5ec254..12bcb8b9f9 100644 --- a/core/src/main/scala/com/microsoft/azure/synapse/ml/logging/Usage/TokenUtils.scala +++ b/core/src/main/scala/com/microsoft/azure/synapse/ml/logging/Usage/TokenUtils.scala @@ -74,8 +74,7 @@ object TokenUtils { private def refreshAccessToken(): Unit = { if (SparkContext.getOrCreate() != null) { - val token = getAccessToken("pbi") - AADToken = Some(token) + AADToken = Some(getAccessToken("pbi")) } else { AADToken = Some(new FabricTokenServiceClient().getAccessToken("pbi")) }