Articles about European Sharepoint Hosting Service
Posts tagged europe sharepoint 2013 hosting

SharePoint 2013 Hosting – HostForLIFE :: How To Link Pages In SharePoint Online?
Dec 15th
Linking SharePoint Pages to another SharePoint page can be done using multiple ways, in this article, I will discuss in detail how you can use these tricks.
There are two ways to add links in the text and those are as follows:
Hyperlink
Using Double-Bracket
Option 1: Text Link
In SharePoint Online, you can often need to link another page from somewhere in the text. To do that all you need to do is highlight the text and choose the link button within the Text web part.
Click on the hyperlink it will open a Popup block where you can see another menu that will give you a list of related pages, you can also insert a link to the page or another page you are linking to.
Here you also get checkbox option to open link in a new tab
Option 2: Double-bracket trick
This is the trick or you can say shortcut to link pages in SharePoint Online.
As you type your text, type in double square brackets “[[“and you will get a list of the available pages to link to. Just choose one of the pages, and you are done – both the text and the link are created at once!

SharePoint 2013 Hosting – HostForLIFE :: ERESOLVE Unable To Resolve Dependency Tree
Dec 8th
When upgrading to latest version of SPFx which is 1.15 (as of writing this article), I got the following error.
npm ERR ERESOLVE unable to resolve the dependency tree.
As you know to install the SPFx following steps need to be performed in sequence.
- Installing Node
- Installing Gulp
- Installing Yeoman
- Installing the Yeomen Generator for SharePoint
The official node version for SPFX 1.15 is Node.js v16.
To install the SPFx or to set up SPFx developer environment please go through the below articles which have detailed steps.
Fixing Vulnerabilities
When installing yeomen there are no issues but vulnerabilities. It is advised to fix the vulnerabilities
As mentioned in the screenshot ran the npm audit fix and the vulnerabilities found are 0.
SPFx Install Error
When Installing the SharePoint generator by running the following command
Npm install @microsoft/generator-sharepoint –global
It gave the following error ‘code ERESOLVE’, ‘ERESOLVE unable to resolve the dependency tree’.
To overcome this issue it is required to add the optional parameter –legacy-peer-deps
As you see the installation is now completed. It also warned about vulnerabilities, which are also fixed by running following npm audit fix command.
To finally know the version of the SharePoint framework or the version of the SPFx that is installed please run the following command.
What does “–legacy-peer-deps ” do?
The parameter flag –legacy-peer-deps introduced in node version v7 as a way to bypass peerDependency auto installation. In other words this flag telling node engine to “Not To Install Any Legacy Dependencies”.
Now let’s try understanding Dependencies vs Peer Dependencies:
- Dependencies can be defined as modules are libraries which are installed in node_modules folder which is needed for NPM (Node Packet Manager) to work properly for designing and deploying the components. For example if you want to install Visual Studio 2022 in your machine, one of the required .net framework is 4.8 which is installed during the installation of the product. For Visual studio to work properly the dependency software we can say it as .Net Framework version 4.8.
- Peer Dependency (peerDependency) can be defined as set of libraries or modules with specific versions are required to run the project or to work with the component. Let’s assume that you have built a software which is developed using visual studio 2019 targeted to framework version 4.5.2. In order for the software to work properly the client machine should have .Net framework version 4.5.2 where the software is installed. In this case for your specific/custom software .Net framework 4.5.2 is Peer Dependency.
Hope you find this article useful. Please let me know for any questions or concerns in comments section.

SharePoint 2013 Hosting – HostForLIFE :: Automation Of Creating SharePoint Site Using Custom Site Template
Dec 1st
SharePoint Online is being used by many organizations not only for collaboration and document management but it is used for several business activities which involve similar types of custom sites.
Let’s take an example project site. User creates a separate site to manage each of the project where the architecture, configuration, and design of the site are the same. SharePoint provides the ability to create a Site Template using an existing site using PnP PowerShell Script.
I am describing here the steps to create a SharePoint site automatically using the existing site template. In this article, we will be using SharePoint List, Power Automate, Azure Automation, and Azure Runbook.
First create a template file using the existing SharePoint Site using below PowerShell Script
The above script creates a XML file called TemplateFile.xml. Upload this file to a SharePoint Library somewhere so that we can use it each time by PowerShell to create a new site.
Now login to Azure Portal and create an Automation Account.
Once automation account is created, then go to automation account.
First you need to install the module you require to run the PowerShell.
Click the “Modules” under “Shared Resource” from the left panel and click the “Browse Gallery”
Then search the pnp.powershell. This will show the module and select.
When you installed the required modules, go to the Runbook.
You will see a Runbook under Process Automation in the left panel.
Click the runbook and create a new runbook. Provide the name of runbook, select PowerShell as runbook type, runtime version, and description.
Once runbook is created, go to runbook. You will find “Edit” link on top with other links.
Click the edit link. You will find an editor to put your PowerShell Script. Now enter the below PowerShell Script. We will be passing SiteURL as parameter.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
param( [parameter(Mandatory = $true)] [string] $SiteURL = "https://tenant.sharepoint.com/sites/SiteName") $UserName = "username@tenant.onmicrosoft.com" $Password = "xxxxxxxxx" $SecurePassword = ConvertTo - SecureString - String $Password - AsPlainText - Force $Cred = New - Object - TypeName System.Management.Automation.PSCredential - argumentlist $UserName, $SecurePassword #Above line will connect SharePoint Site Connect - PnPOnline - Url "https://tenant.sharepoint.com/sites/NewSiteName" - Credentials $Cred $fileRelativeURL = "/sites/SiteName/shared Documents/TemplateFile.xml" #Download template xml file. $file = Get - PnPFile - Url $fileRelativeURL - AsFile - Path c: \temp - Filename " TemplateFile.xml" # Connect new site where template will be implemented. Connect - PnPOnline - Url $SiteURL - Credentials $Cred #Implement the template. Invoke - PnPSiteTemplate - Path "c:\temp\TemplateFile.xml" - ClearNavigation |
After putting the script, click Save and Publish the runbook.
Now Create a SharePoint List that will contain a list of projects.
Then create a new flow using Power Automate connected to the above list triggered “When an item is created” so that flow trigger as soon as a new item is created in the list. Add next steps in the flow as “Send an HTTP request to SharePoint” and put the details as below:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
Site Address: Your SharePoint site address Method: POST Uri: /_api/SPSiteManager / create Headers: accept - application / json; odata.metadata = none Body: { "request": { "Title": "Site Name returned from list", "Url": "https://tenant.sharepoint.com/sites/SiteName", "Lcid": 1033, "ShareByEmailEnabled": false, "Description": "Description of site", "WebTemplate": "STS#0", "Owner": "owner@tenant.onmicrosoft.com", } } |
Microsoft Power Automate has connector available to connect with a runbook under an automation account. Add an action and select “Azure Automation” connector, then select “Create a job” from the list of actions.
This will require your azure details like subscriptions, resource group, automation account, and runbook. When you select your runbook, it will prompt for parameter defined in the runbook. Pass the parameter and save. This will call the script and pass the parameter to script.
You can add more actions in the flow like updating a list or sending a notification mail etc.
Your flow will look like below.
Now automation is ready.
Please create a new item to the list. It will trigger the flow and create a new site with custom template.
Now automation is ready.
Please create a new item to the list. It will trigger the flow and create a new site with custom template.

SharePoint 2013 Hosting – HostForLIFE :: Enable Session State In SharePoint 2019
Nov 24th
Introduction
While working on SharePoint Server 2019 (on-premise) high-availability setup, client asked to enable session state in the SharePoint production farm, as previously they have faced the issue in high-availability setup via load balancer that whenever any user performs some activity and session is stable for few minutes, the user gets logged out of the application and then user has to login again to access the application, which means user’s session is not persisted.
Description
As you might know that ASP.NET Session state is disabled by default in SharePoint installation, however if you are working with custom solutions, web-parts, third pary tools, etc., persisting the user information per session is very much important and required. So, in this article, I will explain how you can enable session state in SharePoint 2019.
Note
ASP.NET allows persisting session states in below three different ways and it is always a good practice to enable the session state at SQL Server (database) –
- On server memory as an InProc
- On SQL Server to persist session in database (preferred method)
- On Session State Server to persist session on dedicated server memory
Step 1
Enable ASP.NET Session State Service – ASP.NET Session state can be enabled in the SharePoint farm by enabling “SharePoint Server ASP.NET Session State Service” service application on the SharePoint farm. This service application cannot be enabled using SharePoint’s Central Administration interface. This service application can be enabled using below PowerShell command –
Enable-SPSessionStateService –DefaultProvision
By default, this will create service application database with “SessionStateService_<GUID>”, on the database server where SharePoint’s farm configuration database is located and will be provisioned using Windows credentials of the logged in user.
In case you want to create the service application with specific database name, then use the below PowerShell command –
Enable-SPSessionStateService -DatabaseServer <YourDBServerName> -DatabaseName <YourDBName>
Step 2
Check the SharePoint Server ASP.NET Session State Service in Manage Service Applications in SharePoint’s Central Administration –
Step 3
Check if the default service application database is created in the database server
Step 4
The above PowerShell command adds the module in web.config of all the web applications in the farm. Kindly note, that if you have multiple servers in the farm, then module will be added automatically in the web.config file of all the web-front servers, as such you don’t need to add any entry manually in web.config file.
Secondly, a “sessionstate” entry will be created in all the web applications in the farm, as shown in below image
Note
As shown in above image, by default, it would create session for 60 minutes. If you want to increase or decrease session expiration, you can pass “SessionTimeout” parameter while creating ASP.NET Session State Service using Enable-SPSessionStateService command.
Step 5
To ensure that SharePoint web application gets activated to persist ASP.NET sessions, the web.config file needs to be manually updated for the specific SharePoint web application on all web-front servers in the farm. Search for <pages enableSessionState in web.config. By default, its value will be False, you have to make this property as True, as shown in below image
Note
- The web.config path of web application is: C-drive -> inetpub -> wwwroot -> wss -> VirtualDirectories -> WebApplicationPortNumber
- Please take the backup of web.config file before making any manual changes in the web.config file.
I hope by using the information in this article, you will be able to implement session management in SharePoint 2019 farm.

SharePoint 2013 Hosting – HostForLIFE :: How To Get User Information In Infopath Form Using User Information List With SharePoint Online?
Nov 18th
In this blog, I will explain how to get User Information in InfoPath form using User Information List with SharePoint Online (Office 365).
User Information List
User information list is the SharePoint list that stores all the user information details. So, we will directly use this list and get user’s details.
Steps to get the users information
Step 1
Open your InfoPath form in InfoPath Designer. Open “Data Connection”, you can open data connection with two way.
1. Open from “Data” tab
2. Directly, click on “Manage Data Connection” in bottom right corner of the field panel.
Step 2
After opening the “Data connection”, click on the “Add” button.
Step 3
Once you click on the “Add” button, it will open a new “Data Connection Wizard” and select “Create new Connection to:” and “Receive data” and then click on the “Next” button.
Step 4
Then select “SharePoint library or list” and click on the “Next” button.
Step 5
Enter your Site URL in the textbox and click on the “Next” button.
Step 6
Select the last “User Information List” from the list and click on the “Next” button.
Step 7
It shows all user information columns. Select the checkbox based on your requirement and click the “Next” button.
Step 8
In the next window select the “Next” button.
Step 9
Next window enter your connection name, select “Automatically retrieve data when form is opened” and click on the “Finish” button, “Connection Wizard” will be closed automatically
Step 10
In “Data Connection Wizard” a new connection will be displayed, close the window now.
Scroll drop-down and select the “User Information List”.
Step 11
Then expand the “data field” and right-click on “d: SharePointListitem_Rw” folder and select “Repeating Table”.
Once you select, the table appears in your form and once you click on preview, it will show all user Information.
Output
Here User’s Full name, Login name, and ID is been displayed.
SharePoint 2013 Hosting – HostForLIFE :: How To Use News Web Part In SharePoint Online?
Nov 11th
In this article, we will understand the use of the news web part in SharePoint Online. This Web part helps to add announcements or news on the site page.
News Web-part in the Sharepoint Page
1. Open the Site page in edit mode by clicking Edit at the top right of the page and Insert the News Web part in the Section.
2. Click on the edit button on the left of the web part to open the Web part properties wherein various layouts, news sources, filters, and organizing of news post options can be selected.
- News Source: News can be selected from the following news sources:
- This site
- Select Sites
- Recommended for the current user
The above options specify the source from which the news post will be picked. The news posts created will be reflected in the selection of This site or the Select Site option.
- Layout: Following layouts are available:
- Top Story – Maximum number of news posts displayed – 04
- List- Maximum number of news posts displayed – 08
- Side by Side – Maximum number of news posts displayed – 12
- Hub News – Maximum number of news posts displayed – 12
- Carousel – Maximum number of news posts displayed – 08
- Tiles – Maximum number of news posts displayed – 05
- To hide the title and commands switch the toggle to off under Show title and commands.
- Various other commands such as Show compact view in narrow widths, Show number of views, Show author, and Show first published dates can be kept on or off as needed.
- Filter: News posts can be filtered based on Title including the word, Recently Added, Recently changed, Created by, Modified by, Managed property
- Organize: News posts can be organized in the desired order by using Organize option
- Once we are done with the necessary editing, Publish the page.
These are the steps to be followed for the use of the News web part in SharePoint Online.