Hello @Prithvi Singh,
Welcome to Microsoft Q&A Platform. Thank you for reaching out & hope you are doing well.
I understand that the error you are getting HTTP header value is not in the correct format is due to the x-ms proposed-lease-id header being set to a non-GUID value. In your case, the string update row level security is being passed as the lease ID, which is invalid. Based on the screenshot, it looks like the BlobLeaseClient is being initialized with the container name rather than a valid GUID.
To fix the issue, please execute the below steps,
1. Generate a Valid GUID for the Lease ID
string leaseId = Guid.NewGuid().ToString();
2. Set up the BlobLeaseClient using the GUID
BlobLeaseClient leaseClient = blobClient.GetBlobLeaseClient(leaseId);
3. Obtain the lease agreement
Response<BlobLease> leaseResponse = await leaseClient.AcquireAsync(TimeSpan.FromSeconds
- Make sure you are targeting a blob rather than a container.
BlobClient blobClient = containerClient.GetBlobClient("mutex");
BlobLeaseClient leaseClient = blobClient.GetBlobLeaseClient();
This will ensure that the lease ID is in the correct format and that the lease operation targets the intended blob resource.
Reference link:
Create and manage blob leases with .NET - Azure Storage | Microsoft Learn
Kindly let us know if the above helps or you need further assistance on this issue.
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.