@Saurabh Patil
Please try the code below and see if it works for you:
String connString = "<storage account connection string >";
String containerName = "<container name>";
String blobName = "<file name>";
BlobServiceClient client = new BlobServiceClientBuilder().connectionString(connString).buildClient();
BlobClient blobClient = client.getBlobContainerClient(containerName).getBlobClient(blobName);
BlobSasPermission blobSasPermission = new BlobSasPermission().setReadPermission(true);
OffsetDateTime expiryTime = OffsetDateTime.now().plusDays(1);
BlobServiceSasSignatureValues values = new BlobServiceSasSignatureValues(expiryTime, blobSasPermission)
.setStartTime(OffsetDateTime.now());
System.out.println(blobClient.generateSas(values));
There is also a relevant thread on GitHub which you might find helpful. If you are still facing issues I recommend also posting your question on Stack Overflow so our developer community can also assist.
Hope this helps. Please let me know if you need further assistance.
-------------------------------
Please don’t forget to "Accept the answer" and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.