Error getting user information when debugging Azure Synapse Analytics pipeline with Synapse notebook executing statement mssparkutils.env.getUserName().
{
"errorCode": "6002",
"message": "Py4JJavaError: An error occurred while calling z:mssparkutils.env.getUserName.\n: org.json.JSONException: JSONObject[\"signaturePayload\"] not found.\n\tat org.json.JSONObject.get(JSONObject.java:520)\n\tat mssparkutils.env$$anonfun$extractField$2.$anonfun$applyOrElse$1(env.scala:28)\n\tat scala.util.Try$.apply(Try.scala:213)\n\tat mssparkutils.env$$anonfun$extractField$2.applyOrElse(env.scala:28)\n\tat mssparkutils.env$$anonfun$extractField$2.applyOrElse(env.scala:26)\n\tat scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:38)\n\tat scala.util.Failure.recoverWith(Try.scala:236)\n\tat mssparkutils.env$.extractField(env.scala:26)\n\tat mssparkutils.env$.getUserName(env.scala:44)\n\tat mssparkutils.env.getUserName(env.scala)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.lang.reflect.Method.invoke(Method.java:498)\n\tat py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:244)\n\tat py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357)\n\tat py4j.Gateway.invoke(Gateway.java:282)\n\tat py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)\n\tat py4j.commands.CallCommand.execute(CallCommand.java:79)\n\tat py4j.GatewayConnection.run(GatewayConnection.java:238)\n\tat java.lang.Thread.run(Thread.java:748)\n\nTraceback (most recent call last):\n\n File \"/home/trusted-service-user/cluster-env/env/lib/python3.8/site-packages/notebookutils/mssparkutils/env.py\", line 8, in getUserName\n return envc.getUserName()\n\n File \"/home/trusted-service-user/cluster-env/env/lib/python3.8/site-packages/py4j/java_gateway.py\", line 1304, in call\n return_value = get_return_value(\n\n File \"/opt/spark/python/lib/pyspark.zip/pyspark/sql/utils.py\", line 111, in deco\n return f(*a, **kw)\n\n File \"/home/trusted-service-user/cluster-env/env/lib/python3.8/site-packages/py4j/protocol.py\", line 326, in get_return_value\n raise Py4JJavaError(\n\npy4j.protocol.Py4JJavaError: An error occurred while calling z:mssparkutils.env.getUserName.\n: org.json.JSONException: JSONObject[\"signaturePayload\"] not found.\n\tat org.json.JSONObject.get(JSONObject.java:520)\n\tat mssparkutils.env$$anonfun$extractField$2.$anonfun$applyOrElse$1(env.scala:28)\n\tat scala.util.Try$.apply(Try.scala:213)\n\tat mssparkutils.env$$anonfun$extractField$2.applyOrElse(env.scala:28)\n\tat mssparkutils.env$$anonfun$extractField$2.applyOrElse(env.scala:26)\n\tat scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:38)\n\tat scala.util.Failure.recoverWith(Try.scala:236)\n\tat mssparkutils.env$.extractField(env.scala:26)\n\tat mssparkutils.env$.getUserName(env.scala:44)\n\tat mssparkutils.env.getUserName(env.scala)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.lang.reflect.Method.invoke(Method.java:498)\n\tat py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:244)\n\tat py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357)\n\tat py4j.Gateway.invoke(Gateway.java:282)\n\tat py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)\n\tat py4j.commands.CallCommand.execute(CallCommand.java:79)\n\tat py4j.GatewayConnection.run(GatewayConnection.java:238)\n\tat java.lang.Thread.run(Thread.java:748)\n\n",
"failureType": "UserError",
"target": "<notebook>",
"details": []
}