SharePoint (2003 thru Online): SharePoint Online; SPO
Showing posts with label SharePoint Online; SPO. Show all posts
Showing posts with label SharePoint Online; SPO. Show all posts

Wednesday, March 11, 2026

PowerShell Script to update Company logos across all SharePoint Online Sites

We apply Company logos across all SharePoint Online Site Collections and subsites. When a new logo is designed, I receive requests to update them. The PowerShell script below simplifies this process.

While running this script, you will get a window prompt to login with your Global Admin/SharePoint Admin account. Enter credentials and proceed forward.

# --------------------------
# Configuration
# --------------------------
$clientId = "12a34567-f123-4567-890e-1cch23456789"
$SiteCollectionUrl = "https://yourtenant.sharepoint.com/sites/company"
$LogoUrl = "https://yourtenant.sharepoint.com/sites/BrandGuide/Images/Company_Logo.png"

# Connect to root once (to enumerate subsites)
Connect-PnPOnline -Url $SiteCollectionUrl -Interactive -ClientId $clientId

# Get root + all subsites (recursive)
$webs = Get-PnPSubWeb -Recurse -IncludeRootWeb

# ---- Count of all sites (webs) ----
$totalSites = $webs.Count
Write-Host "Total sites (root + all subsites) found: $totalSites" -ForegroundColor Cyan

# Detect if your Connect-PnPOnline supports -ReturnConnection
$hasReturnConnection = (Get-Command Connect-PnPOnline).Parameters.ContainsKey("ReturnConnection")

$success = 0
$failed  = 0

foreach ($w in $webs) {
    try {
        Write-Host "[$success/$totalSites] Updating logo for: $($w.Title) -> $($w.Url)" -ForegroundColor White

        if ($hasReturnConnection) {
            $conn = Connect-PnPOnline -Url $w.Url -Interactive -ClientId $clientId -ReturnConnection
            Set-PnPWeb -Connection $conn -SiteLogoUrl $LogoUrl   # Set-PnPWeb works on current web / via -Connection
        }
        else {
            Connect-PnPOnline -Url $w.Url -Interactive -ClientId $clientId
            Set-PnPWeb -SiteLogoUrl $LogoUrl                    #
        }

        $success++
        Write-Host "SUCCESS: $($w.Url)" -ForegroundColor Green
    }
    catch {
        $failed++
        Write-Host "FAILED: $($w.Url) | $($_.Exception.Message)" -ForegroundColor Red
    }
}

Write-Host "Logo update process complete." -ForegroundColor Cyan
Write-Host "Summary: Total=$totalSites | Success=$success | Failed=$failed" -ForegroundColor Yellow

The result shows as below.

Monday, February 23, 2026

'Filter by' option for the Name column in SPO Document Library.

When I received this requirement, I reviewed several blogs and Google AI instructions, but none addressed my goal. After further research, I was able to achieve it and would like to share an article that aims to enable the 'Filter by' option for the Name column.

When a document library is first created in Modern SharePoint Online, you'll see the Name, Modified, and Modified by columns, with All Documents set as the default view.

The 'Filter by' option is available for the Modified and Modified by columns, but not for the Name column.



Top right down to '+ Create or upload' you will see Options (click on it) > Edit View.

In Edit View, under columns, after scrolling down you will notice three types of Name columns as shown below.

1. In Display, Uncheck, Name (linked to document with edit menu).
2. In Display, Check, Name (for use in forms) replace the Position from left.
3. Click OK to save the modifications.


Once redirected to the view, you will notice Filter by option for the Name column.


Monday, April 3, 2023

Open MFA enabled SharePoint Online site with SharePoint Designer 2013

If your tenant has multi-factor authentication turned on, your Internet Explorer was disabled, with Edge as default browser, and you were trying to use SharePoint Designer 2013, you will encounter the error shown below.

"The Web Server does not appear to have any authentication methods enabled. It asked for user authentication, but did not send a WWW-Authenticate header." 


This was because Office 2016 and Older Versions use Basic Authentication method.

As SharePoint Designer 2013 was part of Office 2013 clients, and to overcome this, you need to enable Modern Authentication.

To enable modern authentication for any devices running Windows, you need to set the following registry keys. 



Once the above Registry Keys were added with Hexadecimal value 1, then it should look as shown below.


Open the SharePoint Designer 2013, Go to Account. It should show your login info.



 Now try to open the SharePoint Online Site Collection, it opened like charm.


Tuesday, February 8, 2022

Save Email attachments to SharePoint Online Library

Incoming E-Mail Settings was deprecated in SharePoint Online. In this scenario we are trying to re-create this feature using Exchange Online and Power Automate.

Below are the steps to be followed.

Step 1: Create a Shared Mailbox  [Note: Shared Mailboxes don’t require licenses assigned]

Login into https://admin.exchange.microsoft.com/#/mailboxes  Exchange admin center.


Fill the mandatory fields and click on Create. [Alias can be left blank. No blanks if entered]

Shared mailbox was created successfully.

You can use 'Add users to this mailbox' to add users to manage the Shared Mailbox as shown in above image or use 'Manage mailbox delegation' as shown in the below image to add users to manage the Shared mailbox.


Add User to Read and manage the Shared Mailbox.

Now the Shared Mailbox is ready to use.

If MFA is enabled on your tenant, please disable MFA for the Shared Mailbox account.

Step 2: Go to M365 admin center > Users > Active Users (using the below link).

Search for the Shared Mailbox you created. Select, click on Reset password to set a new password, so that you can access the Shared Mailbox.


Step 3: From App Launcher Click on Power Automate
or login into https://us.flow.microsoft.com/en-us/. Go to Templates and search for 'save my email attachment'. Click on the 'Save my email attachment to Sharepoint document library' template.


Once the template is loaded, click on Fix connection...
You will see the below screen, Click on Sign in

Pick the SharedMailBox account you created above, for the 3 Connections to be fixed.


Once the Connections were successfully completed, Click on Continue
Click on the (. . .) on top-right of each workflow item to make sure SharedMailbox account was connected under My connections.


Click on the Folder icon and select Inbox. Make sure Only with Attachments and Include Attachments is Yes (as shown below).

Select the Site Address from Dropdown or by typing the Site URL. Click on the Folder icon and select the Document Library in the Folder Path.

Verify and update To, Subject and Body fields as per your requirement. This flow will send an email notification in case of any error occurred.

On top-right below your name click on Flow Checker to view any Errors or Warnings.

On top-right or at the end of the Flow, Click on Save to save the Flow.
On top-left you will see a message 'Your flow is ready to go' as shown below.

Click on My flows, you will see the saved flow under Cloud flows.


Step 4: Verification

Sent email from my Gmail account to the SharedMailbox account.


It took more than 15 mins for the attachment to appear in the SharePoint Library.

As of now, this is only the Workaround solution found to replace the Incoming E-Mail Settings feature.

Wednesday, February 26, 2020

Integration - CRM Online & SharePoint Online

The main reason for this Integration is to use SharePoint Online as Document Repository. All the Documents upload in CRM Online will be stored in SharePoint Online.

NOTE: In the below steps, we used our development tenant. Please change the tenant while copying URLs.

For this, first create a Site Collection in SharePoint Online.

https://gurram.sharepoint.com/sites/CRM

Created a sub site for current usage.

Go to Dynamics 365 > Settings > Document Management (under System).

https://gurram.crm.dynamics.com/main.aspx?settingsonly=true#640309862

Click on 'SharePoint Sites'


Click on 'New', to create a new SharePoint Site record.


Enter the below Required fields.


First, we need to create a Parent Site record filling only Absolute URL with SPO Root Site.
'List Component is installed' should be unchecked (for SharePoint Online).
'Allow Embedding of the Power BI Reports' is Optional.



then, we need to create a Site record filling parent Site and Relative URL.
'List Component is installed' should be unchecked (for SharePoint Online).
'Allow Embedding of the Power BI Reports' is Optional.



Select Active SharePoint Sites created and click on 'Activate'



Again, go to Dynamics 365 > Settings > Document Management (under System).

https://gurram.crm.dynamics.com/main.aspx?settingsonly=true#640309862



Click on 'Enable Server-Based SharePoint Integration' Follow the below steps to Complete Validation.











Active SharePoint Sites created are 'Valid' for usage.

Go to Dynamics 365 > Settings > Document Management (under System) > Document Management Settings

https://gurram.crm.dynamics.com/main.aspx?settingsonly=true#640309862


Select all required entities. Provide the SharePoint Online Company One URL > Next



Check Based on Entity > Select from drop-down. We selected Account > Next



Once Succeeded, Click Finish.



Go to Site Contents of the SharePoint Online Company One. You should see all the newly created Document Libraries.