Jul 13, 2019

Everything is fine, but we had a small problem getting your license.. SharePoint 2013 AppStore Error

Recently i configured app store on my SharePoint 2013 environment and when i try to add the app from appstore , i got  below message :

Error :
" Everything is fine, but we had a small problem getting your license. Please go back to the SharePoint Store to get this app again and you wont be charged for it. "


Fix :
Usually you get this error when you try to add app using system account. So use non system account.


May 16, 2019

Root Element Missing when connecting to SharePoint online via CSOM/Powershell on windows 10 machine

Hello friends,

Recently i got a situation where suddenly my csom code is stopped working . This CSOM code is to connect a SharePoint online site to fetch data from some list. The same code was running fine earlier.

Issue Description:

When connecting to SharePoint Online site using CSOM or Powershell(using Connect-SPOService command) from Windows 10 machine getting an error "Root Element Missing"

CSOM error : 

At context.ExecuteQuery it thrown "Root Element Missing" with below stack trace




Powershell Error :



Tried in different ways to fix this, like from changing the schema of my app config file, clearing VS cache , running on new version vs 2019 professional , by referring the new CSOM dlls ,clearing Nuget Package cache and finally formatting windows 10. But none of them helped me out.

also

1> The same code worked in other machine
2> The same code working for other online sites from same machine

I was so confused that, whether it is an issue from my machine or the SharePoint site. I noticed that, the stack trace is clearly showing there is an xml notation issue in SharePoint Client libraries.

Finally after troubleshooting for days i found that the issue is with my ISP( Internet Service Provider ) /internet settings.

Resolution :
Changing the DNS settings will resolve this issue. Here are the steps.

Go to Control Panel --> Network and Internet --> Change Adapter Settings --> Select the Network through which you are connecting to Internet



Right click on it and Select Properties. Then select Internet Protocol Version 4 (TCP/IPV4) and select properties



Then select the "Use the following DNS Server Addresses" instead obtain DNS server addresses automatically and give the DNS whatever you want. Here i gave the free DNS address which is offered by google.

Google public DNS addresses : 8.8.8.8 and 8.8.8.4 

Then say OK to apply these changes.

I ran the code again , both csom and powershell worked well without any issues.

References :
https://www.koskila.net/fixing-security-reasons-dtd-prohibited-xml-document-issue/
http://asp.net-hacker.rocks/2016/01/15/XML-parsing-problem-because-of-your-ISP.html
https://www.windowscentral.com/how-change-your-pcs-dns-settings-windows-10

Hope this helps somebody.

Thanks
Purna

Sep 23, 2018

Customizing SharePoint Online (Office 365) Login Page


Friends,
Here I am going to explain you, how we can customize the look and feel of login page of a SharePoint online site.
Prerequisite to perform this action is , you should have global admin rights on the tenant.

As you know the default SharePoint online page looks like below (I am using personal free trail account, so the login page may look slight different from the licensed/organizational one).
























Here are the steps to customize the login page

Login to your office365 admin page (https://admin.microsoft.com/AdminPortal)  with your admin credentials.

Expand Navigation Menu (>) à Select Admin Centersà Select Azure Active Directory




Then it will redirect you to Azure portal (url looks like https://aad.portal.azure.com ), then select Azure Active Directory from left pane


Select Company Branding --> Select Configure --> You can see a page like below with all options.




























Fill in the details and upload images as per your company branding requirements. Then you can see the login page like below : ( as i mentioned earlier, as this is a trail version you may see slight difference in the design but the approach is same)




Thanks,
Purna

Mar 16, 2017

Reasons why Nintex Workflow doesn't start automatically

Guys,

Nintex workflow doesn’t start automatically because of  :

  1.  Either you are running your workflow with “System Account” or
  2.  In workflow settings  "when items are created/modified set to No" like below figure 
·                                                                   
·        To change this setting to Yes --> Go to your workflow --> Ribbon-->Workflow Settings --> Select Yes in the dropdown.


Sep 24, 2016

ListItem.SystemUpdate is available with new csom version 16.1.5626.1200

Guys,

Long waiting SystemUpdate() method is available with the release of the new csom version(16.1.5626.1200).

Add this csom package using Nuget by searching "Microsoft.SharePointOnline.CSOM" like below



Once you refer these latest csom assemblies, You can see SystemUpdate method for the ListItem like this




Refer this link for all other properties and methods released with this new csom version .
https://dev.office.com/Contents/Item/Display/11116


- PURNA

Sep 22, 2016

Cannot sign in to SharePoint Online using SharePoint Designer 2013 - 403 forbidden403 forbidden403 forbidden403 forbidden403 forbidden

Hi Guys,

Recently i have installed Sharepoint Desinger 2013 and tried to connect to SharePoint Online Site. But it dint allow me to login  and thrown this below error :

"403 forbidden403 forbidden403 forbidden403 forbidden403 forbidden "


I am the tenant admin and have all the rights to open site in designer. So there is no issue with the permissions. The only resolution i found is, updating the designer with ServicePack1.

Here are the links for the service Packs.



Close your designer, install the service pack and re-open it. It works like a charm.!

Hope this helps some one.

- PURNA

Feb 9, 2016

SP2013 Designer Workflow Error : There was no endpoint listening at net.pipe://localhost/SecurityTokenServiceApplication/appsts.svc that could accept the message

Hello Guys,

Recently I got a requirement to work on SharePoint 2013 Designer Workflow. In my server all the required configurations like WF Manager, Service Registration etc  is already setup in the server, But when i started publishing the workflow i have got this below error message

"Microsoft.Workflow.Client.WorkflowCommunicationException: The request was aborted: The request was canceled. Client ActivityId : ba605d9d-e11c-606d-5c6c-4dac94c6c3a1. ---> System.Net.WebException: The request was aborted: The request was canceled. ---> System.ServiceModel.EndpointNotFoundException: There was no endpoint listening at net.pipe://localhost/SecurityTokenServiceApplication/appsts.svc that could accept the message. This is often caused by an incorrect address or SOAP action."




I googled it for some time and checked the service application status, logs, "Refresh Trusted Security Token Services Metadata feed timer job" etc etc. But no luck. After spending some (of course hours :) ) i came to know that the below windows service should be running to publish the workflow (some how this is stopped in my machine)




Once start the service, i could successfully publish the designer workflow.

Thanks
Purna





Dec 16, 2015

How to upload Images to SharePoint List from another library with OOB feature


Guys,

Recently I got a small requirement to give an option to the user to select images from another library in to SharePoint list while adding a new item. Basically the default attach file option of a list item opens you the windows explorer to choose the items.

Firstly I thought, I should go for list form customization and a script injection by creating a file upload control and save the selected image in to the item with sp modal dialogue and the call back options.

But later I found that, this can be achieved using the OOB site column called “Image with formatting and constraints for publishing”, which is available with the Publishing Infrastructure Feature.

Steps to use this:
·          Create a site column called “Image with formatting and constraints for publishing”.

Site Actionsà Site Settingsà Create Site Column à Give some name “Product Image” of type “Image with formatting and constraints for publishing “






·        Add the site column to your list where you want the image upload feature.
List Settingsà Add from existing site columns à Select the above created site column

·        In the New Form you can see this column like this




              
      On clicking of the link, it will open a popup to select an image from a library. On click of browse, it will list all the lists and libraries throughout the site collection, from where you can choose an image and insert.






Once you say insert, it will ask you to provide other properties like size, layout, alternate text etc. like below




It will added to your list item like this




In Edit form, on selection of Image it will highlight the respective ribbon options to update the image.

Really this saves lot of time in developing a custom feature to upload image in new and edit forms…

Hope this helps…!!!!

Nov 16, 2015

Bulk Check-In the files in SharePoint with OOB feature

Hello Guys,

Recently i have noticed an oob feature to bulk check-in the files from the SharePoint Site Actions page.. sharing the same with you in this post...

Here are the steps ..

Go to Site ActionsàSite Settings àSelect "Content and Structure" under Site Administration group and then Change the view to “Checked Out to Me” as shown below



You can see all the files which are check out by you in the website.

Select all and say “Check In” from Actions Menu as shown below.



If you notice the context menu of the view tab, you have multiple options like "My Tasks","Last Modified by Me" etc..( see the below screen shot for the options )




This feature is available with SharePoint 2007 (Moss) too..

Thanks
Purna




Oct 9, 2015

Can not find Microsoft.Office.SecureStoreService.dll in SharePoint 2013

Hello Guys,

Recently I came across with a requirement to access the Secure Store Service Token in one of my project modules. As part of this , I have searched for the securestoreservice dll in 15/ISAPI folder but could not find it there.

I came to know that, the location of this dll is changed in Sharepoint 2013 server as the GAC location of asp.net 4 has changed.

Here is the path where you can find this:

C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.Office.SecureStoreService\v4.0_15.0.0.0__71e9bce111e9429c

Hope this helps someone..

Thanks,
Purna

Sep 13, 2015

Sharepoint App is now SharePoint Add-in - Microsoft update for SharePoint and Office App Names

Guys,

I came across through an msdn blog and surprisingly noticed that the "SharePoint App" names is being changed to "Add-in".  Did you notice this.?

Here is the update :


Original name
New name
Applies to
apps for Office
Office Add-ins
Office
mail app for Outlook
Outlook Add-in
Office
app for Excel
Excel Add-in
Office
app for PowerPoint
PowerPoint Add-in
Office
app for Word
Word Add-in
Office
Office App Model
Office Add-in Model
Office
apps for SharePoint
SharePoint Add-ins
SharePoint
SharePoint App Model
SharePoint Add-in Model
SharePoint
app part
add-in part
SharePoint
app web
add-in web
SharePoint


In msdn,  the posts related to apps (now add-in) shows this name change notification :



Refer this msdn link for more details :

Aug 23, 2015

How to get all the installed apps in a sharepoint online site programatically

Hello guys,

Here I am writing a small post on how to get the apps from a SharePoint Online site. The property "Status" of the AppInstance class tells us the app's status like whether it is installed/uninstalling/disabled etc..

Here I took a console app with managed CSOM code.

  1.        string siteUrl = "https://msplab.sharepoint.com/sites/SPOLPUB/";  
  2.        string username = "purna@msplab.onmicrosoft.com";  
  3.        string password = "mspcloud"; 
  4.        // Ref: Microsoft.SharePoint.Client
  5.        ClientContext ctx = new ClientContext(siteUrl);  
  6.       // Ref :System.Security
  7.        SecureString encryptedSecureString = new SecureString();
  8.        password.ToList().ForEach(encryptedSecureString.AppendChar);  
  9.        ctx.Credentials = new SharePointOnlineCredentials(username, encryptedSecureString); 
  10.       // Ref: Microsoft.SharePoint.Client        
  11.        Site site = ctx.Site;  
  12.        ctx.Load(site);  
  13.        ctx.ExecuteQuery();     
  14.        Console.WriteLine("Successfully Connected to Site "+site.Url);  
  15.        Console.WriteLine("Loading Web.. ");  
  16.        Web web = ctx.Web;  
  17.        ctx.Load(web, w => w.Url);  
  18.        ctx.ExecuteQuery();     
  19.        Console.WriteLine("Web Loaded.." + web.Url);  
  20.        Console.WriteLine("Getting AppInstance Collection ...");        
  21.        //CRC is from CC, so typecasting from cc         
  22.        ClientRuntimeContext ctxRuntime = (ClientContext)web.Context;
  23.        //Getting appinstances from appcatalog with webcontext  
  24.        ClientObjectCollection appInstanceCollection =AppCatalog.GetAppInstances(ctxRuntime, web);
  25.        ctxRuntime.Load(appInstanceCollection);  
  26.        ctxRuntime.ExecuteQuery();  
  27.    
  28.        Console.WriteLine("Got AppInstance Collection...");        
  29.        foreach (AppInstance appinstance in appInstanceCollection)  
  30.        {  
  31.          ctxRuntime.Load(appinstance);  
  32.          ctxRuntime.ExecuteQuery();  
  33.          Console.WriteLine("==================Retrieving App Details =================");  
  34.          Console.WriteLine("App Title: " + appinstance.Title);  
  35.          Console.WriteLine("Principle Id: " + appinstance.AppPrincipalId);  
  36.          Console.WriteLine("Web Url: " + appinstance.AppWebFullUrl);  
  37.          Console.WriteLine("Start Page: " + appinstance.StartPage);  
  38.          Console.WriteLine("Installation Status: " + appinstance.Status);  
  39.          Console.WriteLine("Remote App Url: " + appinstance.RemoteAppUrl);  
  40.          Console.WriteLine("Settings Page: " + appinstance.SettingsPageUrl);  
  41.          Console.WriteLine("Error Details: " + appinstance.GetErrorDetails());  
  42.          Console.WriteLine("==================Completed App Details =================");
  43.        }     
  44.        Console.WriteLine("Completed...");  
  45.        Console.ReadLine();



Here is the output :



If you observe the above code, we have created a object called appInstanceCollection for the ClientObjectCollection class. It needs ClientRuntimeContext and the web.

The ClientRuntimeContext represents the runtime context for  accessing data from remote objects and invoking methods on remote objects. This can be safely typecasted from ClientContext class as shown above.

Note : In the new version of the CSOM dll  you can find a new method called "GetAppDetails()" from the APPcatalog class. Please refer this link.

Hope this helps,

-Purna

Aug 18, 2015

Step by Step Guide to Create Provider Hosted App in Sharepoint 2013 Online with Azure Hosting Model- Part 1

Hello Guys,

In this post I am going to explain you how to develop and publish a SharePoint Provider Hosted app in Online. Here I am using Azure Hosting (low trust or ACS) model to publish the app.

In this post, I am mainly focusing the hands-on steps with very high level information. This is a very big post with 4 parts..

These are the steps involved in building and hosting a provider hosted app in azure.

·       Creating website in windows azure
·       Downloading the azure profile
·       Developing SharePoint provider hosted app in visual studio
·       Generating Client Id and Client Secret in Sharepoint online Site
·       Publishing the appwebsite in to azure
·       Publishing/Uploading  the app in SharePoint online appcatalog
·       Install and Run the App.

Creating website in azure:


Login to azure portal with the Microsoft account and create the azure website from the azure management portal. Like below
Go to azure management portal, Click on Websites in the left pane




Click on “New” link in the bottom left.  Then select Computeà Web AppàQuick Create

Give the url which you want to refer your azure website. Here I am giving it as “moresharepoints.azurewebsites.net”

Select the service plan (make default if you don’t have any subscription)


Then Click Create Web App link in the down. It will create a webapp with the provided url.

Click on the URL (moresharepoints.azurewebsites.net), it should show like this.


Now we are ready with the azure website. In next steps in this post, we will publish our sharepoint app web on to this website.

To publish the appwebsite on to this azure website, we have to use the profile of this website while publishing. So download the profile and save it to your desktop. We will use it in our next steps. How to download..? See below

Download the azure profile:

Go to azure management portal and click on the Website Name.



And download the publish profile. Save it to your desktop or some folder in your system.



The profile would have extension “.publishsettings”(in my case this is the profile  : “moresharepoints.azurewebsites.net.PublishSettings”.)

With this the azure website and its profile creation is done.

Now let’s go and create the SharePoint Provider Hosted app. Follow next post for the continuation...

Refer Part2 for the continuation..