Do we have any way BlobServiceClient with Azure AD infomation(username/password). Here is code im using for connectionString but i cannot find any function for AD:
new BlobServiceClientBuilder().connectionString(connectionString).buildClient();
No, there is no way to do this. But you can use clientId,clientSecret and tenantId to generate credential, then connect to blob storage.
Code Snippet:
ClientSecretCredential clientSecretCredential = new ClientSecretCredentialBuilder()
.clientId(clientId)
.clientSecret(clientSecret)
.tenantId(tenantId)
.build();
BlobServiceClient blobServiceClient = new BlobServiceClientBuilder().credential(clientSecretCredential).endpoint(endpoint).buildClient();
API document:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.