I AM GIRISH KUMAR AND ON MY BLOG YOU CAN FIND MICROSOFT AND SHAREPOINT ARTICLES .I hope these articles may helps you. Just Check out.
Wednesday, September 23, 2020
Azure Function Chaining - Get web Title in SharePoint Online
Console Application to Create new Subsite under site collection using CSOM + SharePoint Online
using System;
using System.Security;
using Microsoft.SharePoint.Client;
namespace ConsoleAppCreateSubsite
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Enter Your Username Please ------- ");
string userName = Console.ReadLine();
//string userName = "girish.kumar@happiestbarik.onmicrosoft.com";
Console.WriteLine("Enter Your Password Please ------- ");
SecureString password = GetPasswordOfYourSite();
Console.WriteLine("Enter Your Site collection URL ------- ");
string SiteCollURL = Console.ReadLine();
Console.WriteLine("Enter Your New Subsite URL name ------- ");
string newSubsiteName = Console.ReadLine();
ListItemCreationInformation itemCreateInfo = new ListItemCreationInformation();
using (var clientContext = new
ClientContext(SiteCollURL))
{
// SharePoint Online Credentials
clientContext.Credentials = new SharePointOnlineCredentials(userName, password);
// Get the SharePoint web
WebCreationInformation creation = new WebCreationInformation();
creation.Url = newSubsiteName; //"MyConsoleWeb";
creation.Title = "WelcomeToConsoleWeb";
Web newWeb = clientContext.Web.Webs.Add(creation);
// Retrieve the new web information.
clientContext.Load(newWeb, w => w.Title);
clientContext.ExecuteQuery();
clientContext.ExecuteQuery();
}
}
private static SecureString GetPasswordOfYourSite()
{
ConsoleKeyInfo info;
//Get the user's password as a SecureString
SecureString securePassword = new SecureString();
do
{
info = Console.ReadKey(true);
if (info.Key != ConsoleKey.Enter)
{
securePassword.AppendChar(info.KeyChar);
}
}
while (info.Key != ConsoleKey.Enter);
return securePassword;
}
}
}
Thursday, February 13, 2020
Powershell Script for add “everyone, except external users” to the visitors group
PS C:\WINDOWS\system32> $orgName="{Tenant name}"
PS C:\WINDOWS\system32> $userCredential = Get-Credential -UserName $adminUPN -Message "Type the password."
PS C:\WINDOWS\system32> Connect-SPOService -Url https://$orgName-admin.sharepoint.com -Credential $userCredential
Get-SPOUser -Site https://$orgName.sharepoint.com/sites/SiteName | Select DisplayName, LoginName
PS C:\WINDOWS\system32> Add-SPOUser -Site https://$orgName.sharepoint.com/sites/Coronavirus -LoginName "c:0-.f|rolemanager|spo-grid-all-users/{GUID}" -Group "Site Visitors"
Display Name Login Name Groups User Type
------------ ---------- ------ ---------
Everyone except external users spo-grid-all-users/{GUID} {Site Visitors} Member
All the Best! Thanks for reading my blog, please do comment and share if you feel helpful.
Power Automate + Excel data
Extract excel data, get manager and update row with user details which will get from GET MANAGER Concepts and examples Key column: Column i...
-
In this blog, I am explaining how to send mail on any domain using an exchange server. You can implement an exchange server following this...
-
• SharePoint REST service architecture-2013 SharePoint 2013 introduces a Representational State Transfer (REST) service that is compar...
-
WhatsApp provides a great communication platform for businesses and organizations. However, while it offers many features like Broadcast Lis...