I am having trouble adding external SharePoint user to an item using the Nintex Action "Office 365 update item permissions"
I can add the external user manually in the item permission and it works fine.
I can add an internal user using that Nintex Action and it works fine.
But if I enter the external user, as format "firstname.lastname@example.org", the workflow returns
Failed to resolve user 'i:email@example.com'
Has anybody tried to add external users using this action ?
I have also tried to add external user using the action and got a The specified user firstname.lastname@example.org could not be found.
Speculating only, but my guess is that sharing with external users with the action is probably not supported because in Office 365 sharing to external users works very differently to sharing with internal users.
thank you, I discussed with Nintex Support who confirmed from developers that it does not allow updating the permissions for External Users, however I am still investigating since the action does a CSOM call to the permission and CSOM is the equivalent of adding users manually to the permission, and manually works .
So I will test the CSOM independently from the workflow and report here.
I'm dealing with a quite similar issue on item permission, and still finding a way to programmatically do via CSOM. Your sharing would be very much appreciated.
Any update Francois? I'm still hardly finding a way to programatically build something against Nintex workflow action. Wish you have something to share! Thank you very much.
sorry for the delay.
Here is the results, thanks to Nintex Support we have more clarity on what the action does:
- "The manual adding of permissions to an external user is actually a bit different than adding them to an internal user.
When you add permissions to an internal user you use the Microsoft.SharePoint.Client.RoleAssignment method to assign the permissions to the user. (...)
- When you add permissions to an external user Sharepoint uses the "WebSharingManager.UpdateWebSharingInformation" method to send the invite to the user " (Nintex support)
So we used a Nintex workflow action to call the REST API referred above BuildUserRoleAssgnments, but it didnt' work. So we went back to basics: trying manually and
- we now have this issue: adding an external user manually is returning an error (screenshot) and this seems to be a bug (have reported it to Microsoft Support)
So we need to pass this first manual step before continuing on the same but via REST.
More to come when I have an update. ..
[UPDATE] the error above only shows if the external is added to the item but was never shared to the entire site. If sharing the site first (eg. low level read) then there is no error.
Latest update; thanks to a developer in my team who did more research:
- The REST method to use in order add external users to a site is WebSharingManager.UpdateWebSharingInformation
- Unfortunately that method is only available to use via CSOM or JSOM.
Below is a blog post explaining why the method can't be used in REST, this is because it is expecting the parameter 'web' http://sharepointfieldnotes.blogspot.co.uk/2015/12/whats-new-in-sharepoint-2016-remote-api.html
Now we know that Nintex Workflow HTTP web service action can only make a REST call. Hence, not feasible from Workflow.
If anyone still needs a running solution, I have done this for a different project:
- send an email to your user and request them to click a link on that email, which points to that page above.