-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[QUERY] Possibility to create VMs on behalf of users via Azure SDK? #44420
Comments
Hi @IbraAltaee thanks for reaching out to us via Github. @billwert can assist with some of these EntraID and Azure Identity SDK questions, and @saragluna can assist with Azure Spring related questions. |
Hello @IbraAltaee! I think the confusion is coming from where you're trying to run the credential. If you're using the Java I think you have two options:
You want your management client and your credential to live on the same "side of the fence", so either frontend or backend. The client will get a token on your behalf automatically (invoking the flow of your chosen credential type.) There may be other ways to accomplish this but I wouldn't recommend them if you can make one of these options work. Regarding MSAL, the Azure Identity SDK is a wrapper around MSAL, so all their flows are exposed through our credential types. The benefit of the Identity SDK is that our management and service clients are built to take a credential which handles everything for you. I wouldn't recommend trying to break back down to MSAL directly - you'd just wind up wrapping whatever you got in something like our Let me know if you have further questions. |
Hi @IbraAltaee. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue. |
Hi @billwert Thanks a lot for your answer. I was actually looking into Regarding |
For future use by others: I was actually able to obtain a TokenCredential credential = new TokenCredential() {
@Override
public Mono<AccessToken> getToken(TokenRequestContext tokenRequestContext) {
return Mono.just(new AccessToken(accessToken, OffsetDateTime.now().plusHours(1)));
}
}; But I will stick to one of the 2 Azure Identity approaches. |
Query/Question
I have a web application (backend: Java Spring Boot; frontend: React NextJS) that is supposed to create VMs on behalf of users (multi-tenant & personal accounts), on their Azure account, using Azure SDK.
So a usual scenario would be: user (could be anyone) opens the website, gets prompted to login to Microsoft, then after login, fills in basic VM configurations form. Finally, the user clicks on 'Create', and the VM is created on their Azure account.
After days of reading through documentations I came to the conclusion that I could use InteractiveBrowserCredential for authentication. But I'm not quite sure whether InteractiveBrowserCredential is appropriate, and when I tried to use it, no popup was shown, and i was just authenticated, so I couldn't test it out.
Finally, I was wondering if AccessToken that is returned by MSAL, usable in a way to obtain a valid Credential to authenticate to Azure SDK.
Why is this not a Bug or a feature Request?
It's not a bug. And I'm not sure whether it's already possible, hence its not a feature request.
Setup (please complete the following information if applicable):
Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report
The text was updated successfully, but these errors were encountered: