Resource not accessible by personal access token for dispatch of workflow in project repository #58868
-
Select Topic AreaQuestion BodyI want to trigger a workflow from a repository dispatch within the repository of an organization. It is a fine grained access token with the organization as owner and the following rights:
When I send the request I get the following 403 response: { I am not sure what I am supposed to use. How else can I authenticate for repository dispatch events of an organization? |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 12 replies
-
|
Did you find any solution for this? I'm running into a similar issue. |
Beta Was this translation helpful? Give feedback.
-
|
If you are coming here from the internet search - do yourself a favor and check repository access as well when using scoped tokens - kinda already covered by @gberenice, but lemme elaborate: I had a token with The 403 I was getting was really confusing and I'm falling into same trap every freaking time I had to create a new scoped token 😅 |
Beta Was this translation helpful? Give feedback.
-
|
The fine-grained permission you need to trigger an action workflow is "Contents". |
Beta Was this translation helpful? Give feedback.
-
|
What I needed to set is |
Beta Was this translation helpful? Give feedback.
-
|
I was able to dispatch a workflow by setting the |
Beta Was this translation helpful? Give feedback.
-
|
Plz watch out workflow type that you want to trigger: if you want to call but if you want to trigger |
Beta Was this translation helpful? Give feedback.
-
|
As of April 2025, I had success with: |
Beta Was this translation helpful? Give feedback.
I tried re-generating with no luck. I was trying to make a PUT request to create a new environment (the fine-grained token had read+write access to the
Environmentsscope which is described asManage repository environments) and kept getting a 403. I eventually had to give the fine-grained token read+write toAdministrationwhich is described asRepository creation, deletion, settings, teams, and collaborators.and the request successfully goes through after that modification only 🤷🏽