cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

How to share a SP list item to an external user, using Nintex (Office 365) workflow?

I have the following list. I need to share the list items to the corresponding emails using workflow. 

 

I already set up the external sharing options for my site. and I can able to share this item manually. How can I atomize this action using Nintex workflow?

Tags (1)
Reply
4 Replies
Workflow Hero

Re: How to share a SP list item to an external user, using Nintex (Office 365) workflow?

Currently, SharePoint isn't actually sharing anything externally in O365. Azure AD is sharing to external users. So setting the permission on a list item is actually assigning an existing user in Azure AD to the item. The Sharing mechanism is actually handled by Azure AD. When you share via the UI, you are starting an event handled by Azure AD to create the guest user if it doesn't exist into the directory, then assign the SharePoint permission to the item or site. 

But, there is a not very well known client side api for sharing in Microsoft.SharePoint.Client.Sharing namespace () 

This could potentially be called via REST calls and not the permission assignment action. 

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: How to share a SP list item to an external user, using Nintex (Office 365) workflow?

SharingResult result = ctx.Web.ShareDocument("https://contoso.sharepoint.com/docs/sample.doc", "someone@example.com", ExternalSharingDocumentOption.Edit,true, "Here's your important document");

This requires PnP components from PnP/Samples/Core.ExternalSharing at master · SharePoint/PnP · GitHub 

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: How to share a SP list item to an external user, using Nintex (Office 365) workflow?

Thanks for your response. I also tried the same. But it is only for the document. Not for list item. I try to share the list item link via this document share method as following in Azure.

DocumentSharingManager.UpdateDocumentSharingInfo(ctx, fileUrl, userRoles, false, true, true, message, true, true);
But it is sharing all items on the list.
0 Kudos
Accept as Solution Reply
Workflow Hero

Re: How to share a SP list item to an external user, using Nintex (Office 365) workflow?

Can you use Microsoft.SharePoint.Client.Web.ShareObject instead?

0 Kudos
Accept as Solution Reply