Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

WebSharingManager.UpdateWebSharingInformation not sending any mail and not generating any share request

$
0
0

Given below is my code. the user is an admin

using (var ctx = new ClientContext(siteUrl))
                {
                    ctx.Credentials = new SharePointOnlineCredentials(userName, SPUtils.GetSecurePassword(password));
                    var users = new List<UserRoleAssignment>();
                    users.Add(new UserRoleAssignment()
                    {
                        UserId = contactEmail,
                        Role = Role.Edit
                    });
                    var sharingInfo=WebSharingManager.UpdateWebSharingInformation(ctx, ctx.Web, users, true,"Please login with liveid", true, true);
                    if(sharingInfo!=null && sharingInfo.Count > 0)
                    {
                        s = sharingInfo[0].InvitationLink + Environment.NewLine+ sharingInfo[0].IsUserKnown;
                    }
                    ctx.ExecuteQuery();
                }

The contact email does not get any email and when I browse to https://<mysite>/Access%20Requests/pendingreq.aspx there is no External User Invitation. The code is executed from an Azure WebAPI

A Few days back some of the groups were accidentally deleted, could this be one of the reasons for this problem?
Any solutions to <g class="gr_ gr_391 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del" data-gr-id="391" id="391">fi</g> this issue.


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>