0

While reading this HTTP POST between Postman and EventHub, I was directed to this: https://learn.microsoft.com/en-us/rest/api/eventhub/generate-sas-token#java

I don't know what resourceUri, keyName, and key to use. Do I use the full URL for the eventHub?

Maybe somebody here could clarify where to get these three parameters.

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
carlos palma
  • 722
  • 3
  • 12
  • 29

1 Answers1

1

But I don't know what resourceUri, keyName, and key to use. Do I use the full url for the eventHub?

You can get these three parameters from the azure portal as shown in the below screenshot:

--> Goto your EventHub Namespace -->shared access policies--> Select default shared access policy(RootManageSharedAccessKey)-->copy Connection string–primary key.

enter image description here

These are the parameters we need to pass to that method for generating the SAS token.

Endpoint=sb://mmxxxxxxxdows.net/; 
SharedAccessKeyName=RootManageSharedAccessKey;
SharedAccessKey=K4Qxxxxxxxxxxxx9o=
Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
RKM
  • 1,234
  • 1
  • 4
  • 9