Day @ Office Episode #4 – Ups! Need to rescue THAT document!

Ever lost someone else’s work while saving yours? We’ve all been there. This is how we use O365 version history to recover lost work.

Day @ Office Episode #3 – Collaborate without creating duplicates

Tired and confused while compiling document[VersionA].doc with document[VersionB].doc from your team while you were already creating a new version of the “original with changes”?

Stop hurting yourself!

Try co-authoring, it’s easy, integrated a agile. See how on the video below:

Day@Office Episode #2 – Fast presentations with great images

Ever wondered how you can reduce all that time searching for the perfect picture image for your powerpoint presentation?

Now imagine that you could do all that without leaving the PowerPoint application window…..

Here is how in the new Day@Office episode:

O365 Groups Vs Yammer Groups Vs Microsoft Teams a brief comparison.

The first time I logged on to Yammer a couple of years ago I said “wow, whenever they find the time to integrate this with a community site it will be the best collaborative solution ever!” I was told I would have to wait a couple of months… well it took a little bit longer but it finally happen! Great day, except that meanwhile, communities are dead, Office 365 groups were born and Microsoft Teams is getting its space. What now? What should I do?

My answer is clear: it depends on the scenario constraints and on the experience that you want to provide. One way to provide an answer to this is to have a clear assessment of the pros and cons of each solution. Today I present my contribution to this daunting task by summarizing the  availability for users and guests (users outside the organization) of some of the most relevant functions  of Yammer Groups, O365 as well as an attempt to tackle these by combining Microsoft Teams and of the combination of Yammer Group with a Team Site as well as an Office365 Group with a Yammer channel.

Office Groups users and guests compare
Microsoft Teams users and guests compare
Yammer Groups users and guests compare

Day@Office #1 – Schedule a team meeting with a single message

Hi everyone,

today I’m proud to announce the first episode of my new web series Day@Office where I will present many very short films with Office365 productivity tricks.

Please enjoy, comment, share and have a wonderful and productive day !

User Adoption – Is the cup half full our half empty?

Whenever a client presents a challenge (aka hard problem to solve) there is this temptation to focus on the things that, in the opinion of the person representing the client business, are missing in their day-to-day work. When we follow this path we end up building solutions based on this person’s perspective of what his organization should be. While some may say that this way we are building the best solution for the organization,  because we are focusing on the best solution involving the best people, others will argue exactly the opposite since we are not considering the organization’s knowledge and improving it. Having seen success and failure cases in both perspectives I’m inclined to say that both perspectives are right and also wrong at the same time since they depend on so many other elements such as timing, culture, IT knowledge among many other either controlled and uncontrolled elements like user adoption.

Picture a Cup

When a client presents me a problem, sorry a challenge, I try to picture a cup. The client presents a me an empty cup. Since my development team is excellent in implementing the technical solution that will fill that cup, my first impulse is to assess the right measurement of the cup and fill it. Everybody knows that this is how we get business done right? There’s an empty cup we fill it and the client is satisfied. The client will eventually come back whenever he finds another cup to fill. Right? Wrong! Filling the glass is not going to dry the clients’ thirst if it doesn’t respond to his organization needs and the project will fail. When a client presents me with an empty cup I shouldn’t be asking how will i fill that cup, I should be asking what is causing this person to be so thirsty and how do I get him to drink?

Resultado de imagem para half empty cup

Fill it correctly

Filling the glass is not going to dry the clients’ thirst if it doesn’t respond to his organization needs. By making an effort to understand the client’s perspective of an empty cup we end up finding more about his business. We get a clearer picture of the cup’s capacity, and find out that it might not be that empty after-all. I found out that most of the times this happens because I’m talking to someone that is so focused on making a change that gets absorbed by the empty portion of the cup. If we fill the cup exactly like it is being asked the cup will spill. A good solution builds upon the existing water and fills the cup right to its optimal capacity.

Don’t Drink it!

And now that that the cup was correctly filled, the client drinks it and we go home. Right? Wrong!! While your client’s representative may seem satisfied with that beautiful clear water that your team provided he will quickly find out that he has no idea on how to drink from that cup. I mean really drink it in a way that will dry everyone’s thirst around him.

Yes clients do that. And yes you should know better 🙂 What your client needs is someone to help him bring the  water to rest of the organization, someone that bridges the gap between his business and the tech solution.

Propose a toast

Literally means propose a toast. Bring everyone together to the same exact point. They will find disconfort and try to resist at first, but once they get up be sure to let them know what their are holding and where we can go together. Make the best wishes and drink together.

The day after

Well… not the exactly day after because you left your client really satisfied. Lets say sometime after, the same client will improve and starting looking to that very same glass in a different perspective, but this time you will not be looking at the client’s half empty or half full cup. You will be looking at the cup of a client that is continuously growing with you.

Now can you see what user adoption means?

Modern Workplaces are here to stay and it’s up to you to make your life better with them.

These last two weeks have been very exciting for Modern Workplace enthusiasts. Microsoft launched Microsoft Teams and  at Web Summit there were many topics related with the impact of technologies in the worplace and work-life balance.  At the summit, Sean Ryan’s had a very exciting presentation of Workplace by Facebook and Bill Brigs (CTO, Deloitte) debated with Charles Manning (CEO, Kocahava) on whether  “Technology has destroyed work-life balance” or not.

Although you can safely assume that I’m incredibly biased towards the positive side of the debate (just take a peak at my taskbar in the picture below), I will still share my opinion with you: “Modern Workplaces are here to stay and it’s up to you to make your life better with it”

My taskbar presenting Outlook, Microsoft Teams, Slack, Sype for Business, WhatsApp and Delve

Continue reading

Auto Hide WebPart – How to

Next time I want my webpart to hide itself I won’t use:

this.hidden = true;

because that will result in:

System.InvalidOperationException: The Visible property cannot be set on Web Part XXXXXXX

Instead, I will do the following:

SPFile myPage= SPContext.Current.File;
SPLimitedWebPartManager limitedWebPartManager;

   //Get the page's limited webpart manager
   using (limitedWebPartManager = myPage.GetLimitedWebPartManager(PersonalizationScope.Shared))
      System.Collections.Generic.List configuratorWebParts = limitedWebPartManager.WebParts.Cast().Where(webpart => webpart.Title == "TITLE OF MY WEBPART").ToList();

     if (configuratorWebParts.Count > 0)
       foreach (System.Web.UI.WebControls.WebParts.WebPart webPart in configuratorWebParts)
           webPart.Hidden = true;


and voila!

Configure a native webpart using another webpart

Have you ever found a scenario where you would like to edit the configurations of native webpart but don’t want to mess it by creating a custom one? In this case you should consider the use of second webpart to do all the messy configurations.

The following example shows how you you can create a custom webpart that modifies the search query string of a content search web part that exists in the same page.

Setup: Add a visual web part to your SharePoint project and add the Newton-King Json.NET reference to your project

  1. On Visual Studio, open your project solution, right click your project folder and select “Add Item “
  2. In the Add New Item menu select “Office/SharePoint” ->  VisualWebPart, give a name ex: “WebPartConfigurator”
  3. Add James Newton-King Json.NET .dll to your project.  This will make it extremely easy to edit the search query once you get it from the target webpart. (you can find it here:

Code: Follow 3 steps -> Get the the LimitedWebPartManager, get the target content search  webpart, configure the  query string in the target content search webpart.

1. Add the following to your class header:

using System.Linq; //For accessing the web part
using Newtonsoft.Json.Linq; // For editing the webparts search query (Json). Don't forget to add a reference to this lib on your project.

2. Uncomment PageLoad method and add the following code:

//Get the page
SPFile membersPage = SPContext.Current.File;
SPLimitedWebPartManager limitedWebpartManager;

//Get the page's Limited Web Part Manager using (limitedWebPartManager = membersPage.GetLimitedWebPartManager(PersonalizationScope.Shared)) {                     ////Gets all the the webpart with "YOUR_WEB_PART_NAME_HERE" name if they exist                     System.Collections.Generic.List<System.Web.UI.WebControls.WebParts.WebPart> searchWebParts = limitedWebPartManager.WebParts.Cast<System.Web.UI.WebControls.WebParts.WebPart>().Where(webpart => webpart.Title == "YOUR_WEB_PART_NAME").ToList();                      ////If any web part is found runs the configuration method "ConfigureWebpart" on it                     if (membersWebParts.Count > 0)                     {                         foreach (System.Web.UI.WebControls.WebParts.WebPart webPart in membersWebParts)                         {                             ////Run the configuration method on your target webpart ConfigureWebPart(webPart); ////Save all the changes made to your target webpart!!!!!!!                             limitedWebPartManager.SaveChanges(webPart);                         }                                                  } } ////Updates all the changes made to the page elements membersPage.Update();

3. Add your ConfigureWebPart method. In this case we will change the query string using Newtons-King lib.

private void ConfigureMembersWebPart(System.Web.UI.WebControls.WebParts.WebPart webPart)
            ////Cast the webpart to a ContentSearchWebPart (ResultScriptWebPart in .Net)
            ResultScriptWebPart membersWebPart = (ResultScriptWebPart)webPart;
            ////Get the query object
            JObject query = JObject.Parse(membersWebPart.DataProviderJSON);
            ////Edit the query object
            query.Property("QueryTemplate").Value = "YOUR_QUERY_HERE";
            ////Set the webpart's query object to the newly edited object.
            membersWebPart.DataProviderJSON = query.ToString();

Finishing: Add the custom web part to the page of the target webpart.

Super short guide to a successful SharePoint 2013 FBA Pack Installation

If you need a super-short reference to get FBA authentication rolling in your SharePoint application, you’ll find it here.

This is a super short guide to a successful experience with Sharepoint 2013 FBA Pack.  For a fully detailed process please refer to Chris Coulson’s life saving article.

Our goal?

Provide FBA authentication in our SahrePoint application

What we need?

The SharePoint2013FBAPack zip file with the Activate.ps1, Deploy.ps1, UnDeploy.ps1and Visigo.Sharepoint.FormsBasedAuthentication.wsp files.

Our three simple steps?

  1. Create users database
  2. Install the Sharepoint 2013 FBA Pack
  3. Configure web application

1. Create users database

  1. Go to c:\windows\Microsoft.NET\Framework64\v4.0.30319\
  2. Run “aspnet_regsql.exe”
    1. Choose “Configure SQL Server for application services” -> click Next
  3. Now that you have created your users database, you must make sure that the the identity running you SharePoint application pool can access it.
    1. Where can you find this identity?  In IIS ->“Application Pools”. Check the value in the Identity column of you SharePoint application pool. Take a note, you’ll need it later.
      1. Open SQL server as an Administrator -> Go to Security/Logins -> Select the user that matches the identity identified earlier -> Right click -> Select Properties -> Check the “Map” box for the database created previously and check the “db_owner” role. -Now the db is ready!

2 . Install the Sharepoint 2013 FBA Pack

  1. If you haven’t download -the pack zip file do it now 🙂 and extract its content
  2. Open a Powershell and navigate to the pack extraction path.
  3. Run “Set-ExecutionPolicy Unrestricted” and “.\deploy [Site Collection URL]

3. Configure Web Application

Now that we have a membership database,  that our SharePoint pool identity can access it and that the FBA pack is installed, we need to configure the membership provider in the config files.

From the approaches described in Chris Coulson’s life saving article. I would recommend to avoid the approach that involves machine.config editing, because unless  you’re doing something very special you don’t really want to disseminate your apps specifics beyond its scope.

With this in mind, also make sure you always backup  your .config files before editing any “tiniest” change to avoid spending hours trying to resolve a character typo our encoding mistakes.

We are going to add the same changes to three different config files. You can find each of these by navigate through IIS -> right click the application -> Explore -> Double click the “web.config” file :

  • SharePoint Central Administration
  • SecurityTokenServiceApplication
  • Your SharePoint application web application
  1. In the <ConnectionString> section add the following line, make sure that [SERVER NAME] matches the fully-qualified name of your db server:
    <add connectionString="Server=[SERVER NAME];Database=aspnetdb;Integrated Security=true" name="[CONNECTION STRING NAME]" />
  2. In the <membership><providers> section add the following and make sure that [CONNECTION STRING NAME]  matches the value of the previous step:
     type="System.Web.Security.SqlMembershipProvider, System.Web, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
     connectionStringName="[CONNECTION STRING NAME]"
     passwordStrengthRegularExpression="" />
  3. In the <roleManager><providers> section add and make sure that [MEMBERSHIP PROVIDER NAME] and [CONNECTION STRING PROVIDER NAME] match the values of the previous steps.:
    <add name="[MEMBERSHIP PROVIDER NAME]" connectionStringName="[CONNECTION STRING NAME]" applicationName="/"
     type="System.Web.Security.SqlRoleProvider, System.Web, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

Now  you’ll be able to add the Membership Provider to your web application when enabling the Forms Based Authentication.

Ok, so… this might not be super-short, but it is short enough. Just be extra careful when editing the config files and you won’t have to worry about anything else.