Azure / Azure/azure-functions-dotnet-worker
BlobTrigger with BlockBlobClient with managed identity connection string returns wrong URI in China
- Dominant language
- C#
- Stars
- 466
- Forks
- 215
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 7
Description
### Description
I have a function like this:
```c#
[Function("Foo")]
public async Task Run(
[BlobTrigger("foo", Connection = "Foo")]
BlockBlobClient blobClient,
Uri uri
)
```
the connection is defined using the [managed identity syntax](https://learn.microsoft.com/en-us/azure/azure-functions/functions-reference?tabs=blob&pivots=programming-language-csharp#connecting-to-host-storage-with-an-identity), ie
```
"Foo__blobServiceUri": "https://foo.blob.core.chinacloudapi.cn"
```
In China, `blobClient` has a URI of `https://foo.blob.core.windows.net` - it should be `https://foo.blob.core.chinacloudapi.cn`.
I also added the `Uri` binding because that has the correct URI, so I can create my own `BlockBlobClient` from `uri` as a workaround.
### Steps to reproduce
As described above
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the BlobTrigger with a BlockBlobClient and the managed identity setting Foo__blobServiceUri in the issue. Compare the injected BlockBlobClient URI with the Uri binding in the China cloud environment; done means the client URI uses the configured chinacloudapi.cn endpoint rather than windows.net.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, csharp
- Domain
- backend, cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100