question

SashinSahasra-8499 avatar image
0 Votes"
SashinSahasra-8499 asked sikumars commented

Authenticate users only with their credentials to azure resource manager using java sdk for a single-tenant application

I want to create an application using java sdk that can create storage accounts on azure cloud. So the user needs to authenticate to azure resource manager via user credentials and after successful authentication, user is able to create a storage account via the application. Is there any way to access resource manager by using only user credentials via java sdk?

azure-storage-accountsazure-blob-storagemicrosoft-identity-manager
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Just checking in to see if the below answer helped. If this answers your query, please don’t forget to click "Accept the answer" and Up-Vote for the same, which might be beneficial to other community members reading this thread. And, if you have any further query do let us know.
Thanks,

0 Votes 0 ·

1 Answer

sikumars avatar image
1 Vote"
sikumars answered

Hello @SashinSahasra-8499,

Thanks for reaching out.

Here are some guidance to achieve above scenario:

  • Onboard authentication and authorization libraries into your application using Microsoft identity platform. Please find Java sample from this article.

  • Get Azure AD token for respective user from Azure AD using Auth code flow and make REST API call to Azure Resource Manager per this article

At a high level, the entire authentication flow for an application looks a bit like this:
113347-image.png

Example of creating an Azure Storage account with the REST API, and refer this article to learn more about Azure Storage REST API Reference.

Hope this helps.

Regards,
Siva Kumar Selvaraj


Please "Accept the answer" if the information helped you. This will help us and others in the community as well.



image.png (86.8 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.