Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EntityPath should be deleted #28021

Closed
tantingjun opened this issue Mar 26, 2019 — with docs.microsoft.com · 7 comments
Closed

EntityPath should be deleted #28021

tantingjun opened this issue Mar 26, 2019 — with docs.microsoft.com · 7 comments

Comments

Copy link

when copy the Primary Connection String from SAS policy, it contains entity path inside the connection string, duplicate with queue name, should delete it.
for example:
"Endpoint=sb://{servicebus-name}.servicebus.windows.net/;SharedAccessKeyName=test-queue-sender;SharedAccessKey={SharedAccessKey}=;EntityPath=test-queue";
need change to:
"Endpoint=sb://{servicebus-name}.servicebus.windows.net/;SharedAccessKeyName=test-queue-sender;SharedAccessKey={SharedAccessKey}=;";


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@KetanChawda-MSFT
Copy link

@tantingjun Thank you for providing feedback. We will review this and provide an update as appropriate.

@KetanChawda-MSFT
Copy link

@tantingjun The document is referencing the connection string from the shared access policy of the service bus namespace RootManageSharedAccessKey . If you copy the connection string from shared access policies of an entity like Queue or Topic than it will add the EntityPath attribute at the end of connection string and you have to remove when you are passing it in the QueueClient or TopicClient .

@KetanChawda-MSFT
Copy link

KetanChawda-MSFT commented Mar 28, 2019

@tantingjun Checking in to see if the above post helped answering your question

@KetanChawda-MSFT
Copy link

@tantingjun Since we have not heard back from you we will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion and we will reopen the issue.

@ThorstenHans
Copy link

I want to bring up this one again @KetanChawda-MSFT
Consider the following scenario:

  • Azure Function using SB Queue Trigger / Binding

[ServiceBusTrigger] and [ServiceBus] requires a queue name to be provided as the first parameter.

Users can spin up SB Namespace and Queue including tailored Authorization Rules for the Queue using Azure CLI.

However, with the latest CLI, I am not able to get the ConnectionString for an Authorization Rule without EntityPath.

Specifying the given connection string (including EntityPath ... ) in Azure Functions will result in a runtime exception.

This means I have to manually remove the EntityPath from connection string. However, if I could request the connection string without EntityPath using az servicebus queue authorization-rule key ... I would be able to handover the result directly to func settings ...

az --version
azure-cli                         2.0.81

command-modules-nspkg              2.0.3
core                              2.0.81
nspkg                              3.0.4
telemetry                          1.0.4

Extensions:
aks-preview                       0.4.17

@1TheMuffinMan
Copy link

1TheMuffinMan commented Dec 22, 2020

@KetanChawda-MSFT

I think the real takeaway here is that the documentation should be a little bit more helpful in pointing out that EntityPath should be stripped out under specific use cases.

Basically, it comes down to if someone was confused enough to open a ticket then the documentation failed. Which is a real bummer because these clarification requests are a massive time sink on what could be time spent on improving other things.

Documentation should be written in a way where someone could context switch to something else, forget a lot of the intricacies of the platform, but still be successful coming back to it by reading the documentation. The Azure portal in particular does a very poor job of implementing this concept which results in an unnecessary amount of time spent just trying to get something up and running.

The Xamarin Forms documentation is probably the most thorough Microsoft documentation I've seen yet. Perhaps take a peek over there some time.

@aulong-msft
Copy link

bumping this thread for i have encountered "Microsoft.Azure.ServiceBus: NamespaceConnectionString should not contain EntityPath" when trying to connect to a queue ( my SAS policy was also constructed with the "manage" role)

Code example:
public void Run([ServiceBusTrigger("%QueueName%",
Connection = "QueueSaSConnectionStringPk")]string command, ILogger log)
{

It seems deleting the EntityPath at the end of the connection string makes it work???????
Before: " "CommandQueueSaSConnectionStringSk": "Endpoint=sb://<>.servicebus.windows.net/;SharedAccessKeyName=<>;SharedAccessKey=<>=;EntityPath=<>","

After: "QueueSaSConnectionStringPk": "Endpoint=sb://<>.servicebus.windows.net/;SharedAccessKeyName=<>;SharedAccessKey=<>=;",

I feel like a documentation update needs to happen, or a code change to correct this error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants