none
External sharing for 3000users RRS feed

  • Question

  • HI. I'm about to do a small applikation for about 3000 external users and Would like some advice in how to administer them.

    The external users are going to have some different access depending of wich group the belong.

    The person who is going to administrate all external users is an end user so it needs to be simple. I was thinking about making a providerhosted app that shows all the users in a table form with the name in first column and checkboxes in the remaining columns so the administrator can check witch groups he belongs to.

    My question is how to programatically add external users to the system? Or must he share the site manually and when the users accept and logs in, then I can use code to add them to different AzureAD groups?

    Saturday, April 16, 2016 8:09 AM

Answers

  • >>My question is how to programatically add external users to the system? Or must he share the site manually and when the users accept and logs in, then I can use code to add them to different AzureAD groups?

    We are able to use the SharePoint CSOM and Core.ExtenalSharing to share the SharePoint site to the external user. However, the user account will be created only when the external users login the SharePoint site.
    Here is a sample code to share the SharePoint site for your reference:

         ClientContext ctx = new ClientContext("https://o365e3w15.sharepoint.com");
                string userName = "";
                string password = "";
                SecureString securePassword = new SecureString();
                foreach (char ch in password)
                    securePassword.AppendChar(ch);
    
                ctx.Credentials = new SharePointOnlineCredentials(userName, securePassword);
                SharingResult result = ctx.Web.ShareSite("SMTPMailAddressHere", ExternalSharingSiteOption.View, true);
    Regards & Fei


                

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, April 19, 2016 8:49 AM
    Moderator