azure-sdk-for-python: Unable to consume events using interactive browser credential
- Package Name: azure-eventhub
- Package Version: 5.11.1
- Operating System: MacOS
- Python Version: Python 3.9
Describe the bug
With an InteractiveBrowserCredential
credential I get the following error consuming via azure.eventhub.aio.EventHubConsumerClient
:
azure.eventhub._pyamqp.aio._session_async:Unable to attach new link: ValueError('Invalid link')
This problem goes away if I use EventHubSharedKeyCredential
.
I am “Owner” on the event hub resource.
To Reproduce Steps to reproduce the behavior:
- Create event hub.
- Connect via
InteractiveBrowserCredential
.
Expected behavior No error.
Screenshots N/A
Additional context Digging deeper into the exception origin, I see the following error message:
Cannot get source or target. Detaching link
This happens in _link_async.py.
Note that within the same program run, the “happy path” of that code block is also visited frequently.
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 18 (9 by maintainers)
Adding that role did the trick. I thought being Owner was enough to implicitly be allowed data access.
For future readers of this issue, wrapping the
InteractiveBrowserCredential
in a simple async wrapping class does work.@malthe can you add this one specifically please
Azure Event Hubs Data Owner
?Yes I am Owner on the resource. On the RG as well.
man. 30. jan. 2023 kl. 19.52 skrev Kashif Khan @.***>: