Bind new organization to Bitbucket

Hi

I have sonarcloud binded to my personal bitbucket account instead of organization.
I was doing some research and found this topic

The problem is my personal workspace is deleted, what can I do to bind Sonarcloud to my company workspace?

The company URL and avatar is coming from Organization workspace but only this " Bind this organization to Bitbucket" is pointing to my personal workspace.

Hey there.

Do you arrive at this page?

Do you have the option to choose the other workspace? Or do you need to change accounts?

I dint get option to select the workspace. how are you getting this option?

P.s - I am an admin on both bitbucket and sonarcloud

My (unverified) assumption is that as long as you are authenticated to an account where you have admin access on your organization’s workspace.

For example, do you have access to this link for your organization (the one you want to bind) from the account where you’re authenticated?

https://bitbucket.org/<WORKSPACE>/workspace/settings/addon-management

Replace <WORKSPACE> with what makes sense for your organization.

Yes. As I mentioned earlier. I am admin on the workspace which I want to bind.

But Sonar-app on bitbucket does not let me select the workspace. Instead, always force me to create a new one.

I’d like you to confirm this point, specifically.

Hi Colin,

Yes I do have access to the link.

It’s telling that SonarCloud already appears in this list. Is it bound already to another organization? That would explain why it’s not available to you.

If you really don’t know, you could uninstall the application on Bitbucket, and then going through the install.

It is not binded to any Sonar Organization as of now. I tried uninstalling and installing it again in bitbucket but when I install it again, it ask to link to sonarcloud, but in sonarcloud it create a new organization instead of letting me select which Bitbucket organization I want to link.

What I’m suggesting is that you uninstall it, and then try to initiate the binding here:

Hi Coli,

As per my first post, sonarcloud is already bound to my personal bitbucket account which was deleted last month. If you see below screenshot, I don’t have the option to bind to my company organization. The Sonarcloud account was previously bound to my company organization and we have imported many projects from that account but somehow last month it connected to my personal bitbucket account since then its not changed and we have not been able to add new projects from the organization bitbucket account.

Ah, I’m sorry, I completely missed that your personal workspace had been deleted.

I tested that on my end, and it doesn’t free up the binding. :thinking: I would have assumed it would.

I’ll flag this for attention (if there’s a way we can handle this more gracefully), but honestly the easiest thing you could do is to delete the existing SonarCloud organization and start a new one, properly bound to your organization workspace.

There are two concerns with that

  1. We will lost the existing results
  2. We have paid monthly invoice recently on 27th May

Hello @varunverma :wave:

I am going to take a deeper look into your issue and hopefully, I can reply as soon as possible either to get more info or, if available, with a suggestion for you to try to solve the issue.

Hi Aura,

If you can help me by EOD today that will be great. As I mentioned earlier, our invoice date is 27th of the month. I need to close that organization and create a new one as recommended by @Colin .

@Colin - One more question for you, Sonarcloud authenticate me with my company’s bitbucket account but its binded to my personal account. How is it configured in the backend?

Hello Varun,

Thanks for letting me know. In that case, it’s better to follow Colin’s recommendation as the information I have available confirms that’s the way to proceed. I will send this as feedback to our team to have it as consideration for new potential features.