Changing an Office 365 group from Private to Public; from the Office 365 group admin itself VS from the sharepoint permsion setting popup

In Office 365 groups we have 2 approaches (at-least 2 approaches) to change the group from private to public OR from public to private:

  1. From SharePoint site >> site permission, as follow:-

enter image description here

  1. From office 365 group admin, as follow:-

enter image description here

now i have noted in the first approach if we change the Group from Private to Public, the SharePoint will add “Everyone except external” inside the SharePoint members group, while using the second approach this will not happen.. so is my assumption correct? and why we get this behavior, although we should be doing the same thing at the end…

office 365 – Authentication with SharePoint Online in Microsoft 365 and simple console application

I need your help with my small application.

I need to create easy console application which will sign into Share Point Online and download some documents from library.

When I am doing this on older SharePoint version it works fine. Unfortunately, its not working on SharePoint Online in Microsoft 365.

string userName = "email.email@email.com";
            string passwordPlain = "passw0rd";
            string baseUrl = "https://teams.mypage.com/sites/TESTSITE/";

            var passWord = new SecureString();

            foreach (char c in passwordPlain) 
                passWord.AppendChar(c);

            var creds = new SharePointOnlineCredentials(userName, passWord);
            
            try
            {
                var authDiguestToken = GetRequestDigest(creds, baseUrl);
               

                Console.WriteLine("Result " + authDiguestToken);
            }
            catch (Exception ex)
            {
                Console.WriteLine("nn Exception: nn " + ex.Message);
            }

So in this example I am going to get token value and display on console.

 private static string GetRequestDigest(SharePointOnlineCredentials creds, string baseUrl)
        {
            var client = new RestClient(baseUrl + "_api/");
            var digestRequest = new RestRequest("contextinfo", Method.POST);
            digestRequest.AddHeader("Accept", "application/json");

            //authentication cookie
            client.CookieContainer = new CookieContainer();
            client.CookieContainer.SetCookies(new Uri(baseUrl), creds.GetAuthenticationCookie(new Uri(baseUrl)));

            //I'm using dynamic jsut for demo, it's better to use some strongly typed class  
            return client.Execute<string>(digestRequest).Data;
        }

So in this case I am using cookie, not sure why its not working with other SharePoint Online in Microsoft 365.

Is there something special which needs to be done to get authenticated?
Please help

Adam

javascript – SharePoint Online (Office 365) – AutoResolve people picker with current user and detect change in people picker value

I am trying to implement a solution in SharePoint Online by customizing the NewForm.aspx page of a out of the box Calendar List using JavaScript with the following requirements:

  1. When page loads, a people picker field gets automatically populated with the current logged in user (and automatically resolved)
  2. If a the user changes the value of the people picker, I want to be able to detect the value change event so that I can apply some custom logic

For the first requirement, I was able to populate the people picker field but not automatically resolve it.
For the second requirement, I was not able to detect the change on the poeple picker’s value.

In the end you can find the code I am using and it contains several approaches on second requirement that I was still not able to put any of them to work.

The problem seems to be accessing the people picker object itself using the following code:

var peoplePickerDiv = jQuery("div(title='People Picker')");
var peoplePickerDivId = peoplePickerDiv.attr('id');
var peoplePickerObject = SPClientPeoplePicker.SPClientPeoplePickerDict(peoplePickerDivId);

In runtime, the peoplePickerObject is always null.

In the research I made on the Internet, any solution to address both requirements used the above code, i.e., getting a SPClientPeoplePicker object by accessing SPClientPeoplePickerDict supplying the people picker’s Id. I confirmed that the id I am supplying is correct.

NOTE: I was able to successfully use the same approach against on-prem SharePoint 2013 but not with SharePoint Online. Not sure if HTML of the people picker changed or there is a different behavior of the JavaScript API to get SPClientPeoplePicker objects in SharePoint Online in comparison with on-prem SharePoint 2013.

Did someone found the same problem and was able to solve it?

Code I am using:

<script type="text/javascript" src="https://sharepoint.stackexchange.com/_layouts/15/clientforms.js"></script>
<script type="text/javascript" src="/_layouts/15/clientpeoplepicker.js"></script>
<script type="text/javascript" src="/_layouts/15/autofill.js"></script>
<script type="text/javascript">

var loginName;

jQuery(document).ready(function () {
//alert("page loaded");
SetPeoplePickerWithCurrentUser();
SetCurrentUserAvailableDays();

jQuery(".ms-inputuserfield").bind('input propertychange', function() { 
     alert("Onchange event" ); 
})

ExecuteOrDelayUntilScriptLoaded(function () {
        setTimeout(function () {
            attachPeoplePickerChange();
        }, 2000);
    }, 'clientpeoplepicker.js');

/*jQuery(".ms-inputuserfield textarea").change(function() {
 alert( "Handler for .change() called." );
});

jQuery(".ms-input").change(function() {
 alert( "Handler for input .change() called." );
});*/

//attachPeoplePickerChange();
}); /*End document ready*/

function SetPeoplePickerWithCurrentUser()
{
var userid = _spPageContextInfo.userId;

//alert("userid: " + userid);

var endpointUrl = _spPageContextInfo.webAbsoluteUrl
+ "/_api/web/getuserbyid(" + userid + ")";
var requestHeaders = { "accept" : "application/json;odata=verbose" };

jQuery.ajax({
   type: "GET",
   url: endpointUrl,
   contentType: "application/json; charset=utf-8",
   dataType: "json"
})
.done(function (data) {
   loginName = data.Title;
   //alert("loginName: " + loginName);
   //SetUserFieldValue("Colaborador",loginName);
   window.setTimeout(SetPeoplePicker, 500);
   //SetUserFieldValue("People Picker",loginName);
})
.fail(function (jqXHR, textStatus, errorThrown) {
   alert("Error: " + errorThrown);
   console.log(jqXHR.status + " : " + textStatus + " - " + errorThrown);
})
.always(function () {
}); 
}

function SetPeoplePicker()
{
SetUserFieldValue("People Picker", loginName);
}

function SetUserFieldValue(fieldName, userName) {
var peoplePickerDiv = jQuery("div(title='" + fieldName + "')");
var peoplePickerDivId = peoplePickerDiv.attr('id');
//var peoplePickerEditorInput = jQuery("input(title='" + fieldName + "')");
//var peoplePickerEditorInput = jQuery("textarea(title='" + fieldName + "')");
var peoplePickerEditorInput = peoplePickerDiv.find("(title='" + fieldName + "')");
    //alert(userName);
//peoplePickerEditorInput.val(userName);

jQuery("div(title='People Picker')").text(userName);

    //Find the Specific People picker field "Colaborador" and set its value
    /*jQuery().SPServices.SPFindPeoplePicker({
  peoplePickerDisplayName: "Colaborador",
  valueToSet: user,
  checkNames: true
});*/

//var peoplePickerEditorObject = SPClientPeoplePicker.SPClientPeoplePickerDict.peoplePickerDiv_TopSpan;
//var peoplePickerEditorObject = SPClientPeoplePicker.SPClientPeoplePickerDict(peoplePickerDivId);
//var peoplePickerEditorObject = SPClientPeoplePicker.SPClientPeoplePickerDict("ctl00_ctl40_g_a543006a_dd2e_46e0_93c8_deeb4d72af44_ctl00_ctl05_ctl06_ctl00_ctl00_ctl04_ctl00_ctl00_UserField_downlevelTextBox");
//peoplePickerEditorObject.AddUnresolvedUserFromEditor(true);
//_PeoplePickerEditor.attr("disabled", "disabled");
}

function SetCurrentUserAvailableDays()
{
var userid = _spPageContextInfo.userId;

//alert("userid: " + userid);

var endpointUrl = _spPageContextInfo.webAbsoluteUrl
+ "/_api/web/lists/getbytitle('Dias Férias 2016')/items?$filter=IniciaisId eq " + userid;
var requestHeaders = { "accept" : "application/json;odata=verbose" };

jQuery.ajax({
   type: "GET",
   url: endpointUrl,
   contentType: "application/json; charset=utf-8",
   dataType: "json"
})
.done(function (data) {
   var availableDays = data.value(0).Dias_x0020_dispon_x00ed_veis;
   jQuery("input(title='Dias úteis')").val(availableDays);
})
.fail(function (jqXHR, textStatus, errorThrown) {
   alert("Error: " + errorThrown);
   console.log(jqXHR.status + " : " + textStatus + " - " + errorThrown);
})
.always(function () {
}); 
}

function attachPeoplePickerChange() {
    //container needs to be an dom element containing the peoplepicker
    var peoplePickerDiv = jQuery("div(title='People Picker')");
    var peoplePickerDivId = peoplePickerDiv.attr('id');
    //helper function to ensure all elements are already created
    var addOnChanged = function (ctx) {
    //alert("addOnChanged");
        //is everything ready we need?
        if (SPClientPeoplePicker && SPClientPeoplePicker.SPClientPeoplePickerDict && SPClientPeoplePicker.SPClientPeoplePickerDict(peoplePickerDivId)) {
            //get picker instance (which has a lot of useful properties btw)
            alert("addOnChanged");
            var picker = SPClientPeoplePicker.SPClientPeoplePickerDict(peoplePickerDivId);
            //save old event (needs to stay in its context due to internal calls
            picker.oldChanged = picker.OnControlResolvedUserChanged;
            picker.OnControlResolvedUserChanged = function () {
                //do your code here
                console.log('OnControlResolvedUserChanged');
                //get current selected users
                console.log(picker.GetAllUserInfo());
                //let old event do its magic
                picker.oldChanged();
            };
        } else {
            //not everything was ready - wait a 10th of a sec
            setTimeout(function () { addOnChanged(ctx); }, 100);
        }
    };
    addOnChanged();
}

</script>

I compared html in SharePoint 2013 onprem with SharePoint Online and they in fact different:

OnPrem:

    <div title="Utilizador" class="sp-peoplepicker-topLevel sp-peoplepicker-topLevelFocus" id="aps_user_13fce4eb-973e-44b9-8cba-ff3d6cddd687_$ClientPeoplePicker" SPClientPeoplePicker="true"><input name="aps_user_13fce4eb-973e-44b9-8cba-ff3d6cddd687_$ClientPeoplePicker_HiddenInput" id="aps_user_13fce4eb-973e-44b9-8cba-ff3d6cddd687_$ClientPeoplePicker_HiddenInput" type="hidden" value='({"Key":"i:0#.w|dev\sp_admin","Description":"DEV\sp_admin","DisplayText":"SharePoint Admin","EntityType":"User","ProviderDisplayName":"Active Directory","ProviderName":"AD","IsResolved":true,"EntityData":{"Title":"","MobilePhone":"","SIPAddress":"","Department":"","Email":""},"MultipleMatches":(),"Resolved":true})'><div class="sp-peoplepicker-autoFillContainer" id="aps_user_13fce4eb-973e-44b9-8cba-ff3d6cddd687_$ClientPeoplePicker_AutoFillDiv" style="left: -1px; top: 26px;" InputElementId="aps_user_13fce4eb-973e-44b9-8cba-ff3d6cddd687_$ClientPeoplePicker_EditorInput"></div><span class="sp-peoplepicker-initialHelpText ms-helperText" id="aps_user_13fce4eb-973e-44b9-8cba-ff3d6cddd687_$ClientPeoplePicker_InitialHelpText" style="display: none;">Introduza um nome ou endereço de correio eletrónico...</span><img class="sp-peoplepicker-waitImg" id="aps_user_13fce4eb-973e-44b9-8cba-ff3d6cddd687_$ClientPeoplePicker_WaitImage" style="left: 376px; top: 4px; display: none;" alt="Esta animação indica que a operação está em curso. Clique para remover esta imagem animada." src="https://sharepoint.stackexchange.com/_layouts/15/images/gears_anv4.gif?rev=23"><span class="sp-peoplepicker-resolveList" id="aps_user_13fce4eb-973e-44b9-8cba-ff3d6cddd687_$ClientPeoplePicker_ResolvedList"><span class="sp-peoplepicker-userSpan" id="aps_user_13fce4eb-973e-44b9-8cba-ff3d6cddd687_$ClientPeoplePicker_i:0#.w|devsp_admin_ProcessedUser1" sid="i:0#.w|devsp_admin" resolveduser="true" data-sp-peoplepickerprocesseduser="true"><span class="sp-peoplepicker-userPresence" id="aps_user_13fce4eb-973e-44b9-8cba-ff3d6cddd687_$ClientPeoplePicker_i:0#.w|devsp_admin_ProcessedUser1_PresenceContainer"></span><span title="SharePoint Admin" class="ms-entity-resolved" id="aps_user_13fce4eb-973e-44b9-8cba-ff3d6cddd687_$ClientPeoplePicker_i:0#.w|devsp_admin_ProcessedUser1_UserDisplay" style="max-width: 331px;">SharePoint Admin</span><a title="Remover pessoa ou grupo SharePoint Admin" class="sp-peoplepicker-delImage" id="aps_user_13fce4eb-973e-44b9-8cba-ff3d6cddd687_$ClientPeoplePicker_i:0#.w|devsp_admin_ProcessedUser1_DeleteUserLink" onkeydown="SPClientPeoplePickerProcessedUser.HandleDeleteProcessedUserKey(event); return true;" onclick="SPClientPeoplePickerProcessedUser.DeleteProcessedUser(this.parentNode); return false;" href="#">x</a></span></span><input title="Utilizador" disabled="disabled" class="sp-peoplepicker-editorInput" id="aps_user_13fce4eb-973e-44b9-8cba-ff3d6cddd687_$ClientPeoplePicker_EditorInput" style="max-width: 366px;" type="text" size="1" value="" autocorrect="off" autocomplete="off" autocapitalize="off" data-sp-peoplePickerEditor="true" AutoFillContainerId="aps_user_13fce4eb-973e-44b9-8cba-ff3d6cddd687_$ClientPeoplePicker_AutoFillDiv"></div>

SharePoint Online:

    <textarea name="ctl00$ctl40$g_a543006a_dd2e_46e0_93c8_deeb4d72af44$ctl00$ctl05$ctl06$ctl00$ctl00$ctl04$ctl00$ctl00$UserField$downlevelTextBox" title="People Picker" class="ms-inputuserfield ms-inputBox" id="ctl00_ctl40_g_a543006a_dd2e_46e0_93c8_deeb4d72af44_ctl00_ctl05_ctl06_ctl00_ctl00_ctl04_ctl00_ctl00_UserField_downlevelTextBox" style="width: 100%; display: none; ;" onkeydown="return onKeyDownRw('ctl00_ctl40_g_a543006a_dd2e_46e0_93c8_deeb4d72af44_ctl00_ctl05_ctl06_ctl00_ctl00_ctl04_ctl00_ctl00_UserField', 3, true, event);" onkeyup="return onKeyUpRw('ctl00_ctl40_g_a543006a_dd2e_46e0_93c8_deeb4d72af44_ctl00_ctl05_ctl06_ctl00_ctl00_ctl04_ctl00_ctl00_UserField');" onfocus="StoreOldValue('ctl00_ctl40_g_a543006a_dd2e_46e0_93c8_deeb4d72af44_ctl00_ctl05_ctl06_ctl00_ctl00_ctl04_ctl00_ctl00_UserField'); saveOldEntities('ctl00_ctl40_g_a543006a_dd2e_46e0_93c8_deeb4d72af44_ctl00_ctl05_ctl06_ctl00_ctl00_ctl04_ctl00_ctl00_UserField'); Sys.UI.DomElement.addCssClass(this, 'ms-inputBoxActive');" onblur="if(typeof(ExternalCustomControlCallback)=='function'){ if(ShouldCallCustomCallBack('ctl00_ctl40_g_a543006a_dd2e_46e0_93c8_deeb4d72af44_ctl00_ctl05_ctl06_ctl00_ctl00_ctl04_ctl00_ctl00_UserField',event)){if(!ValidatePickerControl('ctl00_ctl40_g_a543006a_dd2e_46e0_93c8_deeb4d72af44_ctl00_ctl05_ctl06_ctl00_ctl00_ctl04_ctl00_ctl00_UserField')){ShowValidationError();return false;}else {ExternalCustomControlCallback('ctl00_ctl40_g_a543006a_dd2e_46e0_93c8_deeb4d72af44_ctl00_ctl05_ctl06_ctl00_ctl00_ctl04_ctl00_ctl00_UserField');}}} Sys.UI.DomElement.removeCssClass(this, 'ms-inputBoxActive');" onchange="updateControlValue('ctl00_ctl40_g_a543006a_dd2e_46e0_93c8_deeb4d72af44_ctl00_ctl05_ctl06_ctl00_ctl00_ctl04_ctl00_ctl00_UserField');" rows="1" cols="20" autopostback="0" renderascontenteditablediv="true"></textarea>

Wise Care 365 Pro 5.6.2 Build 558 Multilingual | Nulled Scripts Download

Wise Care 365 Pro 5.6.2 Build 558 Multilingual | File size: 11 MB

Clean registry and junk files from your PCs. Protect your privacy and make your PCs more secure. Provide a better option of optimizing and accelerating your computer!

Protect Your System in Real Time
Take prompt action once some applications attempt to make modification without your permission. This protector will identify and stop any processes that try to secretly change Windows registry.
Prevent programs from changing your Internet Explorer homepage
Prevent any unwanted new application from adding into the windows startup
Prevent changes to the default browser

A Comprehensive PC Cleaner
Wise Care 365 is definitely the preferred option for billions of Windows users who want to keep their Windows PC at peak performance. It removes invalid Windows registry entries and cleans useless files, download history, browsing history, invalid shortcuts, traces, cache, cookies, passwords, Windows components, and files with specific extensions – allowing Windows system to run faster and freeing up more valuable hard disk space in seconds. It is also packed with customizable cleaning options for advanced users.

Worlds Fastest System Optimization Tool
Wise Care 365 adopts worlds top technology. It optimizes PC’s performance, defrags disks and the Windows registry, and manages the startup process as well as services.
Over time, your computers hard disk drive and registry will become cluttered. Wise Care 365 can defrag the drive and registry to make them organized, thus making your computer run faster and more stable. You are going to be amazed by its blazing defrag speed.
Many programs run silently in the background when you start up your computer. Wise Care 365 helps you disable unneeded programs that consume your precious system resources and improves PC startup speed.

Your Ultimate Computer Privacy Protector
Wise Care 365 protects your computer privacy from prying eyes.
Privacy Eraser erases all traces of any computer operation like browsing history and accessed files, so any computer operation you do stays confidential.
Disk Eraser prevents deleted data from being retrieved by third parties.
Disk Shredder can delete files thoroughly so that they can never be recovered.

A Powerful System and Hardware Monitoring Utility
System Monitor displays all the essential information of your computer.
Process Monitor gives users a clear and neat list of all the processes run by user and system, users can shut down any process they don;t need to make the PC run more smoothly.
Hardware Overview offers users both brief and detailed information of all the crucial hardware components, letting users know about their computers at a glance.

A Perfect Platform for Mutual Assistance on PC Problems
The Wise Assistance section of Wise Care 365 is a community for mutual assistance and knowledge sharing on PC problems. Users can ask any questions about their computers, while our experts and other users with relevant knowledge, experience or techniques will answer these questions. Wise Care 365 holds millions of users across the world, so users can get faster and better solutions. It is a connection between users and experts to get faster and better solutions for computer problems.

Features & Benefits:
One-click PC Checkup
Clean & Speed-up Computer
Hardware Inventory
Privacy Protection
Real-time System Protection
Silent Mode
Faster Boot-up Speed
Free-up More Drive Space
Automatic Updates

What’s new:

Homepage

.

How to upload all my folders and files from Local to target folder in Sharepoint online using c# and office 365 Authentication?

I think you can create Console application with C# or use Powershell. I think the Powershell way is too easy and there are lot of articles available in web.

 #Specify tenant admin and site URL  
$User = "Your id"  
$Password = 'Your Password'  
$SiteURL = "Site URL/"  
$Folder = "C:FolderFolderinside"  
#Path where you want to Copy  
$DocLibName = "Documents"  
#Docs library  
# Add references to SharePoint client assemblies and authenticate to Office 365 site - required  
for CSOM  
Add - Type - Path "C:Program FilesCommon FilesMicrosoft SharedWeb Server Extensions16ISAPIMicrosoft.SharePoint.Client.dll"  
Add - Type - Path "C:Program FilesCommon FilesMicrosoft SharedWeb Server Extensions16ISAPIMicrosoft.SharePoint.Client.Runtime.dll"#  
Bind to site collection  
$Context = New - Object Microsoft.SharePoint.Client.ClientContext($SiteURL)  
$Creds = New - Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($User, (ConvertTo - SecureString $Password - AsPlainText - Force))  
$Context.Credentials = $Creds  
Retrieve list  
$List = $Context.Web.Lists.GetByTitle($DocLibName)  
$Context.Load($List)  
$Context.ExecuteQuery()  
# Upload file  
Foreach($File in (dir $Folder - File))  
{  
    $FileStream = New - Object IO.FileStream($File.FullName, (System.IO.FileMode)::Open)  
    $FileCreationInfo = New - Object Microsoft.SharePoint.Client.FileCreationInformation  
    $FileCreationInfo.Overwrite = $true  
    $FileCreationInfo.ContentStream = $FileStream  
    $FileCreationInfo.URL = $File  
    $Upload = $List.RootFolder.Files.Add($FileCreationInfo)  
    $Context.Load($Upload)  
    $Context.ExecuteQuery()  
}  

with folder

function UploadImages($weburl)
{
$docLibraryName = "TestLibrary"
$localFolderPath = "c:InstallDocs"
$subFolderName="SubFolder" ##Pass your Folder Name Here

Add-PsSnapin Microsoft.SharePoint.PowerShell -erroraction silentlycontinue 
$web = Get-SPWeb -Identity $webUrl

$docLibrary = $web.Lists($docLibraryName) 
#Attach to local folder and enumerate through all files
$files = ((System.IO.DirectoryInfo) (Get-Item $localFolderPath)).GetFiles() | ForEach-Object { 

    #Create file stream object from file
    $fileStream = ((System.IO.FileInfo) (Get-Item $_.FullName)).OpenRead()
    $contents = new-object byte() $fileStream.Length
    $fileStream.Read($contents, 0, (int)$fileStream.Length);
    $fileStream.Close(); 

    write-host "Copying" $_.Name "to" $docLibrary.Title "in" $web.Title "..." 

    #Add file
    $folder = $web.getfolder($docLibrary.Title+"/"+$subFolderName) ##Changed code here to get subfolder
    $spFile = $folder.Files.Add($folder.Url + "/" + $_.Name, $contents, $true)
    $spItem = $spFile.Item 



Write-Host -f Green "Added Images to library !!!"
}
}

Example with C# click here

sharepoint online – How to use the Office 365 profile hover card (defaultHoverField) without a person column

On my Sharepoint List, I want to store different team members in something like a text column instead of a person column so that I can handle inactive users or users who have left the organization, while still keeping the default hover effect with the full persona card by using column formatting via defaultHoverField. Is there any way to achieve this?
(eg. by mimicking the person field data in array (“Id”: “…”,
“AccountEnabled”: true,…) to work with defaultHoverField)

office 365 – Sharepoint Lists – Help creating a Traffic Light Calculated Formula & Format for Dates

I am trying to create a Traffic Light system within SharePoint Online (Office 365) using JSON.

The dates should run in accordance to said, Traffic light signal.

What I’m trying to do:

If “Todays Date” is GREATER THAN the (End Date) = RED LIGHT

If “Todays Date” is approaching (or is equal to (3 DAYS away from)) the (END DATE) = YELLOW LIGHT

If “Todays Date” is GREATER than 3 DAYS or more away from (END DATE) = GREEN LIGHT

I have read multiple posts for potential solutions. But haven’t found any success. The JSON code below is what I currently have. From what I can tell the last snippet of the code runs successfully if(($RD) == 'Approaching','','purple')))" as well as everything else. However the remainder of the IF statements aren’t (=if(($RD) == 'No', 'green', if(($RD) == 'Yes', 'red',.

(RD) Remaining Days Calculated Formula:

=TODAY()>(End Date)

Format Reference Column

    {
      "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
      "elmType": "div",
      "txtContent": "=if(($RD) == '', '', '•')",
      "style": {
        "color": "=if(($RD) == 'No', 'green', if(($RD) == 'Yes', 'red', if(($RD) == 'Approaching','','purple')))",
        "font-size": "5em"
      }
    }

As a visual aid this is what my Sharepoint List currently looks like.
As a visual aid this is what my Sharepoint List currently looks like.