New answers tagged

0

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; clientContext.Load(web); clientContext.ExecuteQuery(); web....


0

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 = "username@tenantname.onmicrosoft.com" $SiteCollURL = "https://tenantname.sharepoint.com/sites/Sales" #Credentials to connect $SecurePWD = ...


1

To register a site as Hubsite, you can use the below code: string tenantAdminSiteUrl = "https://tenant-admin.sharepoint.com/"; string userName = "admin@tenant.onmicrosoft.com"; string password = "password"; using (ClientContext context = new ClientContext(tenantAdminSiteUrl)) { SecureString securePassword = new SecureString(); foreach (char c ...


0

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


0

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 Thanks


0

I use 'service account' to do this instead of using UseWebLogin each time. Hope it helps you. #region Variables $Username = "user@tenant.onmicrosoft.com" $Password = "password" $siteURL = "https://tenant.sharepoint.com/sites/wiki" #endregion Variables #region Credentials [SecureString]$SecurePass = ConvertTo-SecureString $Password -AsPlainText -...


0

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.


1

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: private getGroupPhoto(groupId:string):Promise<any>{ return this.props.graphContext.groups.getById(groupId).photo.getBlob().then((k)=>{ let groupPhotoUrl = window.URL ||...


Top 50 recent answers are included