-
Notifications
You must be signed in to change notification settings - Fork 11
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
Can not login to azure in Rider using azure tools #514
Comments
@jgranger36 Where did you originally start the sign in process? Did you select device login or Azure CLI? |
i chose device login first and then tried the cli option. |
If you can reproduce the issue, would you mind sending us Rider logs and report them? (see https://rider-support.jetbrains.com/hc/en-us/articles/360001079770-How-to-collect-Rider-logs- ) |
@jgranger36 Did you try the initial sign in from the settings here? |
I logged in via the build-in terminal via "az cli" but nothing with Managed Identity works. Running the same code in Visual Studio works jus fine. I tried device login, but is doesn't open up a browser, nor gave it a device code. In the previous release the device login worked, but you couldn't even copy paste the device code from the pop-up. |
@jtourlamain do you have any repro steps / description of what you are doing/ where so we can try to reproduce the issue? |
@maartenba I open up a powershell core console. Do a "az login", browser pops up, and I login. I receive all my subscriptions. Next I open up Rider, go to the Azure plugin (cf your screenshot above) and the result is that "Azure CLI (Not logged in) is disabled. I have the same result in Rider 2021.3 EAP10 Beta and 2021.2 When using the device login on Rider 2021.3 EAP10 Beta, the browser pops up, but I can not copy/paste the device code from the Rider screen and need to manually type it over (so room for improvements here). |
I'm assuming |
Thanks! Did some digging into Microsoft's auth libraries that we use. It would be helpful to check a few more things on your machine.
If 1 is not present, and 2 both exists, it would be nice to get an email at maarten at jetbrains .com to do some further digging if you are up for it, but we'll need to collect some extra logs etc. |
Thanks to @jtourlamain 's email, managed to trace the root cause. Right now, when opting for Azure CLI login:
public static AzureTokenWrapper getAzureCLICredential(AzureEnvironment environment) throws IOException {
if (isInCloudShell()) {
return new AzureTokenWrapper(AuthMethod.CLOUD_SHELL, new MSICredentials(environment));
} else {
File credentialParent = getAzureConfigFolder();
if (credentialParent.exists() && credentialParent.isDirectory()) {
File azureProfile = new File(credentialParent, "azureProfile.json");
File accessTokens = new File(credentialParent, "accessTokens.json");
if (azureProfile.exists() && accessTokens.exists()) {
List tokens = (List)JsonUtils.fromJson(FileUtils.readFileToString(accessTokens, "utf8"), List.class);
if (tokens.isEmpty()) {
return null;
}
Right now, the workaround would be to make use of the device login flow, while we look into #548 |
Related issue: https://youtrack.jetbrains.com/issue/RIDER-71312 |
Any progress on this issue? I'm new to Rider on MacOS but hitting the same problem. |
For now, device login is the way to go. |
Are there any updates regarding this issue? |
When will this be fixed? I have a multi tenant account and cannot login. |
We're still investigating the merge from Microsoft's upstream repository. There are quite a few things that need to be verified and validated, and we can't give an accurate ETA. For now, device login is the way to go, or downgrading the Azure CLI version. |
Any update on this? Device login works, but unfortunately the multi tenant-issue is still relevant for many. |
Unfortunately not yet :-( We are investigating ways to resolve this properly. |
I am facing a similar issue, tried everything but it doesn't connect to the tenant I need. Azure CLI option is disabled. |
For now, device login is the way to go if CLI is grayed out. |
@maartenba , when I do device login, it just lists the subscriptions I have access to in production tenant , but doesn't list non production subscriptions . Is there a way I can access those ? |
@mohanajuhi166 Unfortunately that won't work currently, sorry for that |
I don't know how but I did not have this problem a month ago but now, when using Using After reading this https://learn.microsoft.com/en-us/cli/azure/msal-based-azure-cli [
{
//token for subscription one
},
{
//token for subscription two
}
] but it did not work, I probably don't have the right structure for A fix for this will be much appreciated. UPDATE: after reading this Azure/azure-sdk-for-net#33294 (comment) and upgrading |
To which version we need to downgrade? |
@PatrickRainer what I currently have installed:
Also, |
Do we have any news about this? I am having the same problem
|
@PauloDaniel1993 Hi! Our refactoring is still in progress. We will make an announcement when the first version is ready. Sorry for any inconvenience this may cause. |
I am not sure if I have the same problem, but at the moment I can't run our applications on Rider because if I do I get a: I ran "az login" already and everthing works fine. I can run the application in the terminal or with VSCode only Rider somehow doesn't want to sync with azure. |
I am facing the same issue but on Windows! Both Azure CLI/log in with Rider Azure toolkit are not working! |
I was able to fix the issue by logging in though Visual Studio 2022 (Community). After logging in through VS, Rider was also logged in again. |
bump? |
Still facing the same issue. Due to company policy, I cannot use device authentication, i.e. it is required to use the CLI. This means that in my situation, it is not possible to use Rider to build and run my software. |
@ThijmenDam you can try our new preview and share your thoughts #777 |
@rafaelldi thank you very much for this suggestion. So far, logging in using the preview plugin in combination with the CLI login method appears to be working. I haven't tried it extensively yet, but at least I'm logged in and I can see my resources. Thanks! If anything remarkable pops up, I'll let you know in #777. |
#777 worked 👍 |
#777 Preview version worked just fine |
similar issues #332
when attempting the azure sign in process, i get no pop up for device login for azure cli. no response at all. I saw the above issue and checked the authmehtodetail.json file and all values are null including the authMethod. i attempted to add "DC" as the authMethod and save the file, but everytime i open the Azure service authentication screen that file is updated with a null value.
EDIT:
I was able to get it to sign in by calling the Azure Sign In from the search all screen.
below is my about info:
The text was updated successfully, but these errors were encountered: