Bad Request when inviting external users

Hi,

I do have a little problem inviting external users to a folder in O365 SP.

It works flawlessly with an account from another company, but if I use it to invite users from, say, a “normal” microsoft or a gmail address I get a bad request. Funny thing is, manually it’s working.

Error Body:
},
“error”: {
“code”: “ApplicationResultException”,
“message”: “The user has insufficient permissions to create an invitation.”,
“date”: “2019-05-06T16:10:30.9826607Z”
}
}
External sharing for authenticated users is activated.

Has anyone else experienced this or maybe even a solution?
Any help is greatly appreciated.

Cheers
Nils

Hello @TaxusLapis,

The Action Invite External User to SharePoint uses an account tied to the Actions API key. Could you try to create a new Actions API key under the admin account and a test flow which uses the connection? Please give it a try and let us know the results.

Best regards,
Petr Bushuev
Plumsail Team

2 Likes

Perfect, Thanks a lot for the fast reply. That really helped.

Best

Nils

2 Likes

Sorry for adding to an old post but I seem to be having the same/similar issue. My Flow is sending several invites to external users and some go through and some don't. The error message is same OP.

After some digging around, the ones the fail seem to be for users that are NOT already guests in the organization. The ones that already exist as guests send just fine.

I'm not sure what your solution would do and if that would affect what I am seeing happening or not.

Any suggestions? Thanks!

EDIT: Also, I checked the SP settings and the tenant is set to "Anyone" and the site collection is set to "New and Existing Guests". I am able to send a sharing invite through the SP interface to the same user just fine. I had my client create a new API key and that didn't work either.

Hi @EricG,

We're working in the support ticket but I'll share some details here. The current error is that the User has insufficient permissions to send the invitation. We decided to recreate the API key with (new) admin credentials and check again.

Best regards,
Petr Bushuev
Plumsail team

Is there any guidance on this? I'm having an identical problem. No idea what's going on. Created a new admin API key but am getting this identical error message.

The creation of a new API key helped with this particular issue.

I'm having this same issue and I've never got to a resolution, has anyone got this to work?

I've tried new api key with admin account and global admin.

The only way I can get it to work is for the user to already exist as a guest user.

Hello Steven! I have just tested the action and it worked well for me with a global admin account. Please follow these steps:

  1. Ensure that the account you use has the global admin role.
  2. Try to invite external users manually – does it work? If it does not, then most likely you have SharePoint restriction for external sharing. Please check you preferences.
  3. Create a new custom credentials API key. Login should be in format user@tenant.onmicrosoft.com, not user@tenant.com. If the MFA is enabled for the account, use an app password when creating the key.
  4. Open the flow with the failed action, create a new connection for it using the newly created API key, select the new connection and test the flow.

Let me know about results.