How to use organization invitation API?


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?


1 Like


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?

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

1 Like


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!

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

1 Like

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