failed to initialise azure-event-hub with azure AAD(service principal)

Ravikumashi
Contributor

We have been trying to authenticate azure-event-hub with azure AD(service principal) instead of shared access key(connection string) and read events from azure-event-hub and it is failing to initialise azure-event-hubs. And throwing no such method exception.

I am attaching the screenshot for the full error.

Error message fullFrom the error i can see it is because of scala run time compatibility, can someone help me with this please ? I am not sure if i am missing something here.

Following are my configurations:

  1. I am using databricks run time 10.4 LTS.
  2. Azure service principle has 'Azure event hub data receiver' permission
  3. installed following dependencies on 10.4 LTS

com.microsoft.azure:azure-eventhubs-spark_2.12:2.3.22

  com.microsoft.azure:msal4j:1.10.1

4.Trying to implement solutions given in the repositories below.

https://github.com/Azure/azure-event-hubs- spark/blob/master/docs/use-aad-authentication-to-connect-eventhubs.md &

https://github.com/alexott/databricks-playground/tree/main/kafka-eventhubs-aad-auth/src/main/java/ne...

 @Alex Ott​  please could you help with this