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?
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?
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.