Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Ground Controller Lvl 1
Message 1 of 2

[Github App] inviting user to organization, error: "Inviter must be an organization admin"

I am trying to invite members to my org through an installed github app.

I am using @octokit/rest:

octo_kit.orgs.createInvitation({
username,
org: ORG_NAME',
headers: { accept: 'application/vnd.github.dazzler-preview+json' },
})

 

this method corresponds to PUT /orgs/:org/memberships/:username which is marked as "Enabled for Github Apps"

 

I am receiving this error:

errors:
[ { resource: 'OrganizationInvitation',
code: 'unprocessable',
field: 'data',
message: 'Inviter must be an organization admin' } ]

 

My app has the following permission:
Organization Members: [Read/Write]

 

How can I resolve this?

1 Reply
Community Manager
Message 2 of 2

Re: [Github App] inviting user to organization, error: "Inviter must be an organization admin&q

Hi @the-vampiire,

 

Thank you for being here, and our apologies for the delay! If you are still having this issue could you please send us the full output of a `curl -v` request that demonstrates the problem?
 
That should help us investigate the issue. Also, please make sure you mask any sensitive information like OAuth tokens and Authorization headers in the output of the curl command. Please send the output to https://github.com/contact. And include a link to this thread to give support some background on the ticket.
 
I hope this helps!
 
Best,
Andrea

Thanks for being here, sharing, and keeping our community awesome!
Best,
AndreaG

Mark helpful posts with Accept as Solution to help other users locate important info. Don't forget to give Kudos for great content!