Is it not possible for you to use the built in sqlserver-driver?
Sample code for reading below
spark.read \
.format("sqlserver") \
.option("host", "xxx.database.windows.net") \
.option("database",database) \
.option("dbtable", table) \
.option("accessToken", access_token) \
.option("encrypt", "true") \
.option("hostNameInCertificate", "*.database.windows.net")