I have this problem when I try to log in to /admin, tell me what could be the problem?
‘API_ERROR: Although you appear to have the correct authorization credentials, the MyName
organization has enabled OAuth App access restrictions, meaning that data access to third-parties is limited. For more information on these restrictions, including how to enable this app, visit Managing OAuth access to your organization's data - GitHub Docs’
Hi @VladyslavBrynzia , welcome to the community!
Sorry to hear about the trouble! Could you share the URL that you’re trying to login and are seeing the API_ERROR on? Thanks!
Hello Audrey,
I believe I’m having the same issue, since there’s no response from the original poster I’ll allow myself to provide a few informations on my specific case:
- I’m setting up a NextJS application with NetlifyCMS, the identity provider widget and Google Provider OAuth.
- The app is deployed from Github
- When trying to access https://myapp.netlify.app/admin/#/, after logging in through the identity widget, the call to GET myapp.netlify.app/.netlify/git/github/branches/main returns the following error:
Although you appear to have the correct authorization credentials, the <org> organization has enabled OAuth App access restrictions, meaning that data access to third-parties is limited. For more information on these restrictions, including how to enable this app, visit https://docs.github.com/articles/restricting-access-to-your-organization-s-data/
The problem is that I can’t see any way to request third party authorization to github from netlify. I must add that the Netlify Github App is indeed authorized on the particular repository I’m based on (which deploys without any issue)
Let me know If I can provide more information
Hi @MrGuiMan,
You may not have sufficient permissions to request third party authorization in GitHub. You’re looking for this:
Can you get to this page? If not, could you check with your GitHub administrator? They should be able to help.
Please let us know how it goes!
Thanks,
Elden
Hi Elden, thank you for your answer.
I don’t believe this specific screen exists for an organization profile, however the equivalent screen shows no need for permissions update:
and I can confirm that the Netlify app has access to the repository.
Netlify does not however appear on the list of third party access.
For the time being, I was able to solve this issue by providing a personal access token to Git Gateway inside the identity tab, which isn’t ideal but works
Hey there, @MrGuiMan
Thanks for letting us know you found an interim solution! This will be beneficial for future Forums members who encounter something similar. We will leave this thread open in case you have further findings.
I am facing exactly the same issue, on the exact same setup that @MrGuiMan described. Any chance that it has to do with the fact that the repo belongs to an Organization (with enabled limited app access on github)? I am asking because I cannot reproduce the issue when testing from my personal accounts, but it is very consistend when trying from the organization account (on which I am admin btw).
I also bypassed the issue by creating a personal access token, but this is not ideal for various reasons.
Hey @vlahanas ! The only way to do what you’ve described is to create a PAT with the necessary permissions on your organization’s repo (which it sounds like you’ve already done). Here is a link to our Help Docs which goes over how to set up a git gateway with GitHub: Git Gateway | Netlify Docs