Adding userGroup to subsite in sharepoint online using javascript

I want to add a user group to sharepoint subsite using javascript. I have used follwing code and it added a user group to subsite(ABS). and it also added user group to the parent site(OMSTest) which is a root sitecollection. why is that?

function CreateUserGroups(url)   {        var siteUrl = '';     var context = new SP.ClientContext(siteUrl);     var currentWEB = context.get_web();          var membersGRP = new SP.GroupCreationInformation();        var membershipArray = [];       var collContribute = SP.RoleDefinitionBindingCollection.newObject(context);      var rdContribute = currentWEB.get_roleDefinitions().getByName("Contribute");       collContribute.add(rdContribute);         membersGRP.set_title("GROUPP1");       membersGRP.set_description("GROUPP1");       var oMembersGRP = currentWEB.get_siteGroups().add(membersGRP);      oMembersGRP.set_allowMembersEditMembership(false);     oMembersGRP.set_onlyAllowMembersViewMembership(false);        var assignments = currentWEB.get_roleAssignments();     var roleAssignment = assignments.add(oMembersGRP, collContribute);        oMembersGRP.update();       membershipArray.push(oMembersGRP);               context.load(membershipArray[membershipArray.length - 1]);       //clientContext.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded2), Function.createDelegate(this, this.onQueryFailed2));      context.executeQueryAsync(           function () {                     alert("Group Created Successfully");           },           function (sender, args) {                           alert("Failed to create groups " + args.get_message());                       }); } 

Authentication to Sharepoint Online stopped working

I have a C# app using CSOM (latest version v16.1.19223.1200), and it worked fine until about mid-Aug-2019. I verified that the actual password is still valid.


using (var context = new ClientContext(SharepointFolder)) {     // Can't use current user, tried workaround linked from      var creds = System.IO.File.ReadAllLines(Path.Combine(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location), "creds.txt"));     string userUpn = creds[0];     // var spassword = new System.Net.NetworkCredential(userUpn, creds[1]).SecurePassword; // tried this as well     var spassword = new SecureString();     foreach (char c in creds[1]) { spassword.AppendChar(c); }     context.Credentials = new SharePointOnlineCredentials(userUpn, spassword);      Utils.Log.Info($  "Getting page list from {context.Url}");      var pagesList = context.Web.Lists.GetByTitle("Pages");     context.Load(pagesList);     context.ExecuteQuery();  ///// throws: Microsoft.SharePoint.Client.IdcrlException  HResult=0x80048821  Message=The sign-in name or password does not match one in the Microsoft account system.      // ... } 

I’ve traced this with Fiddler, and basically got:

#   Result  Protocol Host                       URL 2   401     HTTPS    /   <<<<<<<<<< Why not the path I provided in SharepointFolder? 3   502     HTTP         /FPUrl.xml   5   200     HTTPS   /GetUserRealm.srf 7   200     HTTPS      /adfs/services/trust/2005/usernamemixed 8   200     HTTPS   /rst2.srf 

Tracing Fiddler with browser access to the same address shows me the first access to SharepointFolder, getting 302-redirected to authentication and working fine.

Give option of choosing a language to users SharePoint Online

By default sharepoint follows below mentioned paths to decide in which language site should be shown

  1. If the User Profile service application is started on the SharePoint Server 2013 farm, the language preferences stored in the user profile are used.
  2. If no language preference is defined in the user profile, or if the server uses SharePoint Foundation 2013, the language preferences stored in the user’s language settings for the site collection are used.
  3. If no language preference is defined in the user’s site collection language settings, the language preferences stored in the user’s web browser are used.
  4. If no language preference is defined in the user’s web browser, the default site language is used.

What I want to know, is there any way to force sharepoint to switch between languages, as per users wish. e.g. we provide dropdown/options from where user selects the language and sharepoint system content (Site settings, Ribbon etc.) is shown in that language.
So instead of referring to user profile/Browser settings, can we overwrite this with dropdown selection?

SharePoint Online – Infopath 2010 filler form – not opening in IE browser

I have an Infopath 2013 form, compatibility form type is “infopath 2010 filler form”.

In my library(SharePoint Online), in Library Settings —> Adv Settings—> I have the setting

“Default open behavior for browser-enabled documents: Open in the browser “

In a page, I have a CEWP with an anchor tag , link to open the template :


At admin centre, the infopath form services settings is to allow browser enabled.

But still, when clicked on the button, Form does not open in browser.

I have made all possible settings for this by searing over the internet.

I am getting below error:

This form cannot be opened in a Web browser. To open this form, use Microsoft InfoPath.  

Please suggest!!

Read Custom search property using Display Template in sharepoint online

Is it possible to read the value of custom crawled property that is mapped to the refinablestring00 property in a search result web part using Display Templates in SharePoint Online (Office 365)?

How to Create Display Templates that Display custom crawled property in SharePoint Online (Office 365)?