SharePoint (2003 thru Online)

Thursday, February 22, 2024

Unblock Multiple Files in the Same Folder (Windows 11)

 In Windows 11, To unblock multiple files in the same folder, go to the folder and right click, you will see the menu as shown below.


Select Open in Terminal

Copy/paste the following command and press Enter: dir | Unblock-File


It works like charm!


Friday, November 3, 2023

Error when accessing a newly created PWA Instance: Project Online

Upon requirement, created a PWA site thru SharePoint Admin center. Create Site > Other Options > Choose a template "Project Web App Site". Added myself as Primary Administrator.



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.


Monday, February 13, 2023

Adding or updating the Primary admin for any SPO Site Collection thru PowerShell Commands.

In this post, we want to achieve the ability of adding or updating the Primary admin for any Site Collection thru PowerShell Commands.

With the new features in SharePoint Admin center, we lost the ability to change the Primary Admin for any Site Collection thru 'Permissions' feature. With new 'Membership' feature, we can add Site admins, Site Owners, Site Members and Site Visitors, but cannot add or update any Site admin(s) as Primary Admin.



With the below PowerShell Commands are updating the Primary Admin from Venugopal Reddy (gvr@gurram.onmicrosoft.com) to Mahin Gurram (gmr@gurram.onmicrosoft.com)

#Variables
$SiteCollURL = "https://gurram.sharepoint.com/sites/smb"
$SiteOwner = "gmr@gurram.onmicrosoft.com"

#Connect to SharePoint Online
Connect-SPOService
#The above Command will prompt you enter SharePoint Admin URL & dialog box to enter your SharePoint Admin Credentials

#Sharepoint online powershell Set Site Owner (Primary Admin) - with Variables
Set-SPOSite -Identity $SiteCollURL -Owner $SiteOwner -NoWait

#Sharepoint online powershell Set Site Owner (Primary Admin) - Direct Command
Set-SPOSite -Identity https://gurram.sharepoint.com/sites/smb -Owner gmr@gurram.onmicrosoft.com -NoWait

After running the above Commands, below is the PowerShell Screen.


The required Site Collection's Primary Admin was updated.

Tuesday, July 5, 2022

Change default color in Calendar without using Overlay of Calendars

Usually, we have Theme colors changing the entire theme of the site including document libraries, lists and Calendars. Here we have an option to add a little CSS script to change the colors of the default Calendar without adding new Views and using Overlay of Calendars.

The default color of the Calendar.

Go to Calendar page > Click on Wheel icon > Edit Page > Add Web Part > Media and Content > Content Editor > Add

The Content Editor Web part was added to the Calendar Page. Click on 'Click here to add new content'.
It will show new Tool bar Menus on top side. Under Format Text > Click on 'Edit Source'

<style type="text/css">
.ms-acal-item {
 BORDER: #C0362C; BACKGROUND-COLOR: #C0362C
}
.ms-acal-default-hover {
 BORDER: #C0362C; BACKGROUND-COLOR: #C3B7AC
}
.ms-acal-apanel-item {
 BORDER: #C0362C; BACKGROUND-COLOR: #C3B7AC
}
</style>

Copy, paste the above CSS Code into the HTML Source Window, Click OK. You will observe the entries color change in the Calendar. 


Below is the color change in the Calendar.


SharePoint Online: “Delete this Document Library” is missing!

Use the below Command to install PnP PowerShell Module.

Install-Module PnP.PowerShell

Once the PnP PowerShell Module is installed successfully, we need to run the below command to register Azure AD Application and Grant Access to the Office 365 tenant by Accepting the Consent on behalf of your organization.

Register-PnPManagementShellAccess

_______________________________________________________________________________________________
SharePoint Online: “Delete this Document Library” is missing!

While migration to SharePoint Online, from SharePoint 2007, 2010 & 2013 versions, there is a chance to copy over the lists and Libraries created by "This system library was created by the Publishing feature" where you don't see option to delete those lists or libraries.

We can achieve that by using the below Powershell Script.
In the below PowerShell Script, we targeted Form Templates Library technically called as FormServerTemplates.

The above is the screenshot before running the Script.

#Parameters
$SiteURL = "https://gurram.sharepoint.com/sites/pro"
$ListName = "FormServerTemplates"
 
#Connect to PnP Online
Connect-PnPOnline -Url $SiteURL -Interactive
 
#Get the List
$List = Get-PnPList -Identity $ListName
  
#Enable Delete option for the list
$List.AllowDeletion = $True
$List.Update()
Invoke-PnPQuery


The below is the Screenshot after running the Script.


Wednesday, February 9, 2022

Enable/Disable Multi-factor authentication (MFA) for selected users in M365/O365

The most common method of authenticating sign-in thru Passwords became most vulnerable with easy passwords and same passwords for multiple sign-ins to different services.

Multi-factor authentication (MFA) provides an additional level of security for sign-ins, which uses both a password (which should be strong) and an additional verification method like smart phone or biometric attribute.

The additional verification method is not employed until after the user's password has been verified. With MFA, even if a strong user password is compromised, the attacker does not have your smart phone or your fingerprint to complete the sign-in.

In few cases we need to disable MFA, for Service accounts and Shared Mailbox accounts, used/managed by a group.

Below are steps to enable/disable MFA for selected users.

Go to M365 admin center > Users > Active Users (using the below link)
https://admin.microsoft.com/Adminportal/Home#/users

Click on Multi-factor authentication.


or Go to Azure Portal > AAD > All Users 
(using the below link)

Click on Per-user MFA


It will land in a different page routing to the below link.
https://account.activedirectory.windowsazure.com/UserManagement/MultifactorVerification.aspx?BrandContextID=O365
Select the user and Click on Disable in the side pane. (If you want to enable, Click on Enable)
Click on Yes

Close the message box.

Verify the MFA Status.

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.

Monday, August 16, 2021

New Guest user - Create user vs Invite user

To Create Guest User, login into https://portal.azure.com/
Go to Azure Active Directory > All users (Preview)


On the top, click on '+ New guest user' (shows the below screens)


Selecting Create user option will create Guest user with your domain name.
Please enter Username and Name (Mandatory Fields). You can enter other optional fields in needed.

  • Selected 'Let me create the password' to follow our organizational password standards.
  • You can select Groups, if you already know.
  • You can also Select Roles, default is User. (if needed. For Ex: When working with External Security Admin, provide Security Reader role)
  • Selecting Usage Location might help with Geolocation Conditional access policies in place. 
  • Job Info is optional, but will help to filter, incase multiple users from same company.
  • Manager is also optional. But selecting might help to identify the related Internal User/Requestor.(Incase of our Company vendors/customers, we select the person who requested to create this Guest user.) 
Once Completed, you can see the message in the Notifications area.
You can go back to the User Profile, edit, add thumbnail image, Employee ID and Email...etc., if needed.

Please send the login credentials to Guest user.
____________________________________________________________________

To Invite Guest User, login into https://portal.azure.com/
Go to Azure Active Directory > All users (Preview)


On the top, click on '+ New guest user' (shows the below screens)

Please enter Email address (Mandatory Fields). You can enter other optional fields in needed.
Selecting Invite user option will create Guest user with given email address.
You can add Personal message if needed.

  • You can select Groups, if you already know.
  • You can also Select Roles, default is User. (if needed. For Ex: When working with External Security Admin, provide Security Reader role)
  • Selecting Usage Location might help with Geolocation Conditional access policies in place. 
  • Job Info is optional, but will help to filter, incase multiple users from same company.
  • Manager is also optional. But selecting might help to identify the related Internal User/Requestor.(Incase of our Company vendors/customers, we select the person who requested to create this Guest user.) 
Click on  Invite   will send Invitation to the email address entered above.

___________________________________________________________________________

Invited Guest user completing Invitation.