In order to delete the site I had to first Open the site.
using (ClientContext clientContext = new OfficeDevPnP.Core.AuthenticationManager().GetAppOnlyAuthenticatedContext(url, <ClientID>, <ClientSecret>))
var web = clientContext.Site.RootWeb;
You could delete the site by PowerShell command “Remove-SPOsite”.
There is PowerShell script for your reference.
#Variables for processing
$AdminSiteURL = "https://tenantname-admin.sharepoint.com/"
$AdminName = "email@example.com"
$SiteCollURL = "https://tenantname.sharepoint.com/sites/Sales"
#Credentials to connect
$SecurePWD = ...
To register a site as Hubsite, you can use the below code:
string tenantAdminSiteUrl = "https://tenant-admin.sharepoint.com/";
string userName = "firstname.lastname@example.org";
string password = "password";
using (ClientContext context = new ClientContext(tenantAdminSiteUrl))
SecureString securePassword = new SecureString();
foreach (char c ...
Yes this can be done. Below is code for your reference.
$myHubsite = "https://marvel.sharepoint.com/sites/avengers"
$SiteUrl = "https://marvel.sharepoint.com/sites/captainmarvel"
Add-PnPHubSiteAssociation -Site $SiteUrl -HubSite $myHubsite
Thanks for the response, but I figured out my issue. When I created the group, I was not giving enough time to create the SP site for the group.Since the site has not been created yet, I get a 403. I just put a "pause"
Start-Sleep -Seconds 180
The pause solved my issue and allowed me to use -useweblogin
I use 'service account' to do this instead of using UseWebLogin each time.
Hope it helps you.
$Username = "email@example.com"
$Password = "password"
$siteURL = "https://tenant.sharepoint.com/sites/wiki"
[SecureString]$SecurePass = ConvertTo-SecureString $Password -AsPlainText -...
Download and install the SharePoint Online Management Shell.
Download and install the SharePoint PnP PowerShell Online.
Then open the SharePoint Online Management Shell, and run your command again. Mark sure enter the right code provide in the SharePoint Online Management Shell.
It working fine in my test.
You can use the getBlob method to get the image bytes as blob and then bind that to the HTML element somewhat as below. If you know a different way, you can use that as well:
let groupPhotoUrl = window.URL ||...