bobwilkinson20 opened a new issue, #6365:
URL: https://github.com/apache/incubator-devlake/issues/6365

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/incubator-devlake/issues?q=is%3Aissue) and 
found no similar issues.
   
   
   ### What happened
   
   I have successfully configured a GitHub connection (classic PAT, GraphQL 
on). From that connection, I have repos directly owned in my account along with 
access to two organizations that are part of our corporate infrastructure. One 
of those organizations is configured to required explicit authorization for the 
PAT
   
   When trying to create data scopes using that connection, DevLake is unable 
to list repos for the organization when the PAT is not authorized for access. 
The UX shows a spinner that runs for ever.
   
   What happens in Add Data Scope:
   ![Screenshot 2023-10-30 at 9 39 09 
AM](https://github.com/apache/incubator-devlake/assets/53875715/178dbd50-4d22-48de-bf1a-b4b572b97e78)
   
   Where PAT authorization occurs:
   ![Screenshot 2023-10-30 at 11 26 18 
AM](https://github.com/apache/incubator-devlake/assets/53875715/0e3057a4-b535-4ecc-a8e3-9f93c0539c23)
   
   
   ### What do you expect to happen
   
   There should be an error message indicating the PAT is not authorized for 
access.
   
   ### How to reproduce
   
   1. Create an GitHub connection using classic PAT, GraphQL on
   2. There should be an organization that requires explicit authorization for 
the PAT and the PAT should not be authorized for it
   3. Try to Add a new Data Scope for the GitHub connection, then select the 
organization that requires authorization
   4. Observe that the repositories list on the right side of the pane does not 
complete loading.
   
   
   ### Anything else
   
   This reproduces every time.
   
   Here is the error message when trying to use an unauthorized PAT from the 
CLI:
   `~ % curl -H "Authorization: token TOKEN" -X GET 
"https://api.github.com/orgs/ORG/repos";
   
   {
     "message": "Resource protected by organization SAML enforcement. You must 
grant your Personal Access token access to this organization.",
     "documentation_url": 
"https://docs.github.com/articles/authenticating-to-a-github-organization-with-saml-single-sign-on/";
   }
   `
   `
   
   
   ### Version
   
   Apache 2.0 License v0.18.1-beta2
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to