title: Error Mounting ADLS on DBFS for Databricks (Error: NullPointerException)
body: <p>I am trying to mount Azure Data Lake Gen 2 in Databricks getting the error seen below.</p>
  <blockquote>
  <p>java.lang.NullPointerException: authEndpoint</p>
  </blockquote>
  <p>The code I am using is shown below</p>
  <pre><code>configs = {
    &quot;fs.azure.account.auth.type&quot;: &quot;OAuth&quot;,
    &quot;fs.azure.account.auth.provider.type&quot;: &quot;org.apache.hadoop.fs.azurebfs.ClientCredsTokenProvider&quot;,
    &quot;fs.azure.account.auth2.client.id&quot;: &quot;&lt;client-id&gt;&quot;,
    &quot;fs.azure.account.auth2.client.secret&quot;: dbutils.secrets.get(scope = &quot;scope1&quot;, key = &quot;kvsecretfordbricks&quot;),
    &quot;dfs.adls.oauth2.refresh.url&quot;: &quot;https://login.microsoftonline.com/&lt;tenant-id&gt;/oauth2/token&quot;}
  
  dbutils.fs.mount(
      source = &quot;abfss://starter1@newresourcegroupadcadls.dfs.core.windows.net/&quot;,
      mount_point = &quot;/mnt/demo&quot;,
    extra_configs = configs)
  </code></pre>
  <p>The full error is given below</p>
  <blockquote>
  <p>--------------------------------------------------------------------------- ExecutionError                            Traceback (most recent call
  last)  in 
  9     source = &quot;abfss://starter1@newresourcegroupadcadls.dfs.core.windows.net/&quot;,
  10     mount_point = &quot;/mnt/demo&quot;,
  ---&gt; 11   extra_configs = configs)</p>
  <p>/local_disk0/tmp/1612619970782-0/dbutils.py in
  f_with_exception_handling(*args, **kwargs)
  312                     exc.<strong>context</strong> = None
  313                     exc.<strong>cause</strong> = None
  --&gt; 314                     raise exc
  315             return f_with_exception_handling
  316</p>
  <p>ExecutionError: An error occurred while calling o271.mount. :
  java.lang.NullPointerException: authEndpoint  at
  shaded.databricks.v20180920_b33d810.com.google.common.base.Preconditions.checkNotNull(Preconditions.java:204)
  at
  shaded.databricks.v20180920_b33d810.org.apache.hadoop.fs.azurebfs.oauth2.AzureADAuthenticator.getTokenUsingClientCreds(AzureADAuthenticator.java:84)
  at
  com.databricks.backend.daemon.dbutils.DBUtilsCore.verifyAzureOAuth(DBUtilsCore.scala:477)
  at
  com.databricks.backend.daemon.dbutils.DBUtilsCore.verifyAzureFileSystem(DBUtilsCore.scala:488)
  at
  com.databricks.backend.daemon.dbutils.DBUtilsCore.mount(DBUtilsCore.scala:446)
  at sun.reflect.GeneratedMethodAccessor292.invoke(Unknown Source)    at
  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:498)     at
  py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:244)  at
  py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:380)    at
  py4j.Gateway.invoke(Gateway.java:295)     at
  py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)
  at py4j.commands.CallCommand.execute(CallCommand.java:79)   at
  py4j.GatewayConnection.run(GatewayConnection.java:251)    at
  java.lang.Thread.run(Thread.java:748)</p>
  </blockquote>
  <p>Any help would be appreciated</p>
  <p>When I run</p>
  <pre><code>dbutils.fs.unmount(&quot;/mnt&quot;)
  </code></pre>
  <p>There are no mount points beginning with &quot;/mnt&quot;</p>
  <p>--</p>
  <p>UPDATE</p>
  <p>Additional Error Message after updating <code>dfs.adls.oauth2.refresh.url</code> as <code>fs.azure.account.oauth2.client.endpoint</code></p>
  <blockquote>
  <p>ExecutionError                            Traceback (most recent call
  last)  in 
  9     source = &quot;abfss://starter1@newresourcegroupadcadls.dfs.core.windows.net/&quot;,
  10     mount_point = &quot;/mnt/demo&quot;,
  ---&gt; 11   extra_configs = configs)</p>
  <p>/local_disk0/tmp/1612858508533-0/dbutils.py in
  f_with_exception_handling(*args, **kwargs)
  312                     exc.<strong>context</strong> = None
  313                     exc.<strong>cause</strong> = None
  --&gt; 314                     raise exc
  315             return f_with_exception_handling
  316</p>
  <p>ExecutionError: An error occurred while calling o275.mount. :
  java.lang.NullPointerException: clientId  at
  shaded.databricks.v20180920_b33d810.com.google.common.base.Preconditions.checkNotNull(Preconditions.java:204)
  at
  shaded.databricks.v20180920_b33d810.org.apache.hadoop.fs.azurebfs.oauth2.AzureADAuthenticator.getTokenUsingClientCreds(AzureADAuthenticator.java:85)
  at
  com.databricks.backend.daemon.dbutils.DBUtilsCore.verifyAzureOAuth(DBUtilsCore.scala:477)
  at
  com.databricks.backend.daemon.dbutils.DBUtilsCore.verifyAzureFileSystem(DBUtilsCore.scala:488)
  at
  com.databricks.backend.daemon.dbutils.DBUtilsCore.mount(DBUtilsCore.scala:446)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  at
  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at
  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:498)     at
  py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:244)  at
  py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:380)    at
  py4j.Gateway.invoke(Gateway.java:295)     at
  py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)
  at py4j.commands.CallCommand.execute(CallCommand.java:79)   at
  py4j.GatewayConnection.run(GatewayConnection.java:251)    at
  java.lang.Thread.run(Thread.java:748)</p>
  </blockquote>