# Importing GitHub Organization stuck in continuous loop

**URL:** <https://community.sonarsource.com/t/importing-github-organization-stuck-in-continuous-loop/24236>\
**Category:** SonarQube Cloud\
**Created:** [May 6, 2020, 2:25pm UTC](https://community.sonarsource.com/t/importing-github-organization-stuck-in-continuous-loop/24236 "2020-05-06T14:25:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bravo](https://avatars.discourse-cdn.com/v4/letter/b/a9adbd/32.png) [@bravo](https://community.sonarsource.com/u/bravo)\
**Post date:** [May 6, 2020, 2:25pm UTC](https://community.sonarsource.com/t/importing-github-organization-stuck-in-continuous-loop/24236/1 "2020-05-06T14:25:24Z")

</div>

I am trying to setup a new SonarCloud account with GitHub. When I start importing an existing GitHub organization, it is stuck in a continuous loop. Here are the details:

I start at this screen:

 ![image](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/2X/0/0db7f346c89a5b46c951d300d5b2e789a3c7e6c8.png)

Clicking ‘Choose an organization in GitHub’ takes me to the GitHub SonarCloud App integration screens and I allow all repositories for my company’s organization and complete the SonarCloud app integration on GitHub. It then comes back to the below screen:

![image](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/2X/4/40299c2676aff0e08a27f127f0c7b0aecb2a131b.png)

Selecting ‘With GitHub’ takes me to this screen:

![image](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/2X/7/76f8e03966daf618210a25d26d9e395d7dfcf317.png)

Within a couple of seconds it again lands in the previous screen to Log In. Clicking again on ‘With GitHub’ repeats this cycle. This goes on in an endless loop.

I am already logged in to both GitHub and SonarCloud before starting the entire process and I have ‘owner’ rights in the GitHub organization I am trying to import.

BTW, the import works for my personal organization. It fails only for my work organization. Any suggestion to troubleshoot this further will be appreciated.

New Topic Template:

- ALM used:GitHub
- CI system used: Jenkins (none configured yet, stuck in organization setup)
- Scanner command used when applicable: Not Applicable at this point
- Languages of the repository: Not Applicable at this point
- Only if the SonarCloud project is public, the URL: Not Applicable at this point
- Error observed: See above
- Steps to reproduce: See above
- Potential workaround: None found yet.

---

<div class="post-metadata">

**Author:** ![bravo](https://avatars.discourse-cdn.com/v4/letter/b/a9adbd/32.png) [@bravo](https://community.sonarsource.com/u/bravo)\
**Post date:** [May 6, 2020, 3:01pm UTC](https://community.sonarsource.com/t/importing-github-organization-stuck-in-continuous-loop/24236/2 "2020-05-06T15:01:36Z")

</div>

It looks like SonarCloud returns a 401 unauthorized response for the following request which happens right after GitHub app installation step. This is probably why I am thrown back to login page as described above.

```auto
https://sonarcloud.io/api/alm_integration/show_alm_organization?installationId=8668391

```

Response

```auto
401
{"errors":[{"msg":"User is not admin of the ALM organization"}]}

```

I am already logged into both GitHub and SonarCloud before starting the process and I have owner rights in the Github organization. A bug somewhere?

---

<div class="post-metadata">

**Author:** ![bravo](https://avatars.discourse-cdn.com/v4/letter/b/a9adbd/32.png) [@bravo](https://community.sonarsource.com/u/bravo)\
**Post date:** [May 6, 2020, 10:24pm UTC](https://community.sonarsource.com/t/importing-github-organization-stuck-in-continuous-loop/24236/3 "2020-05-06T22:24:18Z")

</div>

This was resolved by having another owner of the GitHub organization sign up on SonarCloud.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/system/32/31083_2.png) [@system](https://community.sonarsource.com/u/system)\
**Post date:** [May 13, 2020, 10:33pm UTC](https://community.sonarsource.com/t/importing-github-organization-stuck-in-continuous-loop/24236/4 "2020-05-13T22:33:37Z")

</div>

Closed on May 13, 2020, 10:33pm UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
