# How to use organization invitation API?

**URL:** <https://community.auth0.com/t/how-to-use-organization-invitation-api/76481>\
**Category:** Get Help\
**Created:** [January 16, 2022, 9:54am UTC](https://community.auth0.com/t/how-to-use-organization-invitation-api/76481 "2022-01-16T09:54:06Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![lior1](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lior1/32/33626_2.png) [@lior1](https://community.auth0.com/u/lior1)\
**Post date:** [January 16, 2022, 9:54am UTC](https://community.auth0.com/t/how-to-use-organization-invitation-api/76481/1 "2022-01-16T09:54:06Z")

</div>

Hi

Im trying to invite users to organizations by using the “/api/v2/organizations/{id}/invitations” API end point.  
However, for M2M application this is not supported yet and I get “The specified client\_id does not allow organizations.” error.  
When trying Regular Web Application, Im getting the same error message, so I don’t know if this is supported either.  
I tried the other two application types (Native & SPA) but with those the Client Credentials grant type is not supported and I can’t get the access token.

So my question is, how can I call the invite API from a terminal window using curl?

Thanks,  
Lior.

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [January 18, 2022, 2:44pm UTC](https://community.auth0.com/t/how-to-use-organization-invitation-api/76481/3 "2022-01-18T14:44:23Z")

</div>

@lior1,

If I’m not mistaken, it appears you are trying to pass the client ID of a M2M application, when you should be passing the client ID of the application associated with the org.

For example: you can use a M2M client to request a token for the management API, then send the client ID of whatever app you have set up with orgs with the M2M token in a request. Does that make sense?

---

<div class="post-metadata">

**Author:** ![lior1](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lior1/32/33626_2.png) [@lior1](https://community.auth0.com/u/lior1)\
**Post date:** [January 18, 2022, 3:46pm UTC](https://community.auth0.com/t/how-to-use-organization-invitation-api/76481/4 "2022-01-18T15:46:28Z")

</div>

Hi Dan,

I wasn’t aware that I can use one app to get the access token and use it with a different app.  
This all makes sense now and everything is working.

Thanks a lot

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [January 18, 2022, 3:50pm UTC](https://community.auth0.com/t/how-to-use-organization-invitation-api/76481/5 "2022-01-18T15:50:32Z")

</div>

@lior1,

Yes, the M2M Management API tokens are usually globally scoped (except for a few user-centric specific cases) and can perform admin actions against your tenant. In this instance, the client ID in the invitations request is a reference, not specifying the client which is making the request.

Hope that makes sense!

---

<div class="post-metadata">

**Author:** ![lior1](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lior1/32/33626_2.png) [@lior1](https://community.auth0.com/u/lior1)\
**Post date:** [January 18, 2022, 3:57pm UTC](https://community.auth0.com/t/how-to-use-organization-invitation-api/76481/6 "2022-01-18T15:57:46Z")

</div>

Yes, it’s all clear now, thanks again.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [February 2, 2022, 3:58pm UTC](https://community.auth0.com/t/how-to-use-organization-invitation-api/76481/7 "2022-02-02T15:58:36Z")

</div>

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