Microsoft

Blog Categories

Subscribe to RSS feed

Archives

Follow Microsoft Technologies on Pinterest

Archive for the ‘SharePoint’ Category

Advanced Content Targeting in SharePoint – Part 3

This is the third post in this series. In the last two posts (here and here), we implemented a custom token for the logged in user which filters incoming content in the search index based on the user’s profile attributes, and then creating display templates to render custom result URLs. Today we will dive into
extending this concept to the search results hover panel.

Scenariosearching_stick_figure_800_clr_1813
An internal portal accessed by employees and contractors in three dozen locations comprising of countries and/or regions. Authoring takes place in a separate content site and content is rendered on the publishing site. All content is targeted with three important profile attributes –
a. Location (comprises of country and it’s region)
b. Role
c. Business Unit

Each piece of content/link takes the user to the publishing site keeping authoring unexposed to the end user. What this means for search results is
1. The results should be targeted based on user profile properties (mentioned above)
2. Customizing search results URL to point to publishing site
3. Customizing hover preview to display publishing pages (instead of the authoring site content pages)
4. Customizing Control template to implement custom paging

The focus of today’s article will be #3. When SharePoint 2013 came out, the focus was primarily on making sure each result is quick and easy to find and read, while still displaying as much relevant information as possible to the end user.
When the user wants to learn more about a result, they hover their cursor over that result to see the hover panel dialog box.  The hover panel contains rich metadata that enables users to investigate a result more thoroughly, without having to click through and load the document. Hover Panel is broken into three sections
a. Header
b. Body
c. Footer Actions
The files which provide these sections are *HoverPanel.js , *HoverPanel.html, and then html and JS file for each of the following: *HoverPanel_Body, *HoverPanel_Actions, *HoverPanel_Header. These files could be found in the /search center site Master Page gallery.

In order to display the publishing site page in the hover preview we’ll need to make few changes to the OOB hover panel. Let’s start with making a copy of the “Item_DefaultHoverPanel_Actions.html”. This ensures keeping our customization separate.

Step 1
Update the managed property mapping section with our custom properties. In this case RefinableString00 and RefinableString01

hp1

 

Step 2
Snippet to build the linkURL. This linkURL points to the publishing site (instead of authoring)

hp2

Step 3
Render the hover panel header

hp3

Step 4
Render the body section

hp4

 

Step 5

hp5

Towards the end of the above DIV block, add this snippet to enable rendering of your custom preview

hp6

 

 

A Day in the Life of an Office 365 User

shutterstock_158503835

Office 365 comprises of a lot of services and features which can be overwhelming for an end user. More often than not, we hear concerns from organizations and individual users of how roll out of new products and technologies fail. I do not see this as a technology problem, rather a communication and change management issue.

At Perficient, we deal with this day in and day out and understand the importance of a successful roll out. Any big technology implementation requires a significant investment (time and effort) towards creating and utilizing process, training, and governance. It’s not just big talk, but an extremely important undertaking when moving your platform to the cloud (Office 365).

When we look at a typical day in life of an end user from the time they start their day to the time they shut down their devices (and brains), they go through their emails, work on documents, involve in conversations (phone or messaging), search for content, and much more. Office 365 connects all of these tasks and make it seamless so it’s tightly interwoven. In this post I will take the opportunity to showcase few of these scenarios and demonstrate how a day would look like for an office 365 user. Read the rest of this post »

Advanced Content Targeting in SharePoint – Part 2

This post is a continuation of my previous blog post explaining advanced content targeting using SharePoint search. We saw earlier how to implement a custom token for the logged in user which filters incoming content in the search index based on the user’s profile attributes. Today we are going to look into creating display templates to render custom result URLs. Before we begin let’s refresh our memory with the scenario here

Scenario

An internal portal accessed by employees and contractors in three dozen locations comprising of countries and/or regions. Authoring takes place in a separate content site and content is rendered on the publishing site. All content is targeted with three important profile attributes -

a. Location (comprises of country and their region)
b. Role
c. Business Unit

Each piece of content/link takes the user to the publishing site keeping authoring unexposed to the end user. What this means for search results is

1. The results should be targeted based on user profile properties (mentioned above)
2. Customizing search results URL to point to publishing site
3. Customizing hover preview to display publishing pages (instead of the authoring site content pages)
4. Customizing Control template to implement custom paging

Solution

In the previous post we covered #1 above. This post will focus on #2.

By default all the search results points the user to the actual authoring pages which is (in this case) sitting in a separate site. Because the authoring site (usually) does not have any branding or targeting enabled, we do not want our users to lose their place in the navigation. In order to avoid that we came up with top level category pages with each of them having sub category sections which render page content from the authoring site. So in essence the publishing site URL for any piece of content will look like this: http://inranetportal.com/pages/[categoryname].aspx#[subcategory]. The hash tag in the URL is to enable anchor links (bookmark) feature. It’s not relevant in this context so we’ll leave it out.

1. We declare the managed property mappings – Here we used RefinableString0 and RefinableString1 to map the category and sub category metadata fields.

dt1

2. Build a custom linkURL

dt2

dt3

3. This leads us to the html section to render the linkURL

dt4

4. And this is how the result URL look like

dt6

Advanced Content Targeting using SharePoint Search

There are various ways to achieve content targeting in a content management system. In SharePoint, some common terms which are associated with this feature are Audience Targeting, Security Trimming, Metadata etc. Today I am going to share an example which we recently implemented for our customer and which required advanced targeting rules.

Scenario

An internal portal accessed by employees and contractors in three dozen locations comprising of countries and/or regions. Authoring takes place in a separate content site and content is rendered on a publishing site. All content is targeted with three important profile attributes -

a. Location (comprises of country and their region)

b. Role

c. Business Unit

Each piece of content or even a link takes user to the publishing site keeping authoring unexposed to the end user. What this means to search is

a. Customizing search results URL to point to publishing

b. Customizing hover preview to display publishing pages

c. And most importantly the results should be targeted based on user profile properties (mentioned above)

Solution

In order achieve the above, we designed a custom solution extending content by search web part. This solution inserts a query token into the content search web part which filters the indexed content with logged in user’s profile attributes (Location, Role, Business Unit). (Credit goes to my colleague Ryan Selley for developing this robust solution)

First we’ll map managed properties to crawled properties for the taxonomy terms used to tag content.

mp

Then we’ll create the custom web part in Visual Studio by extending content by search.

wp1

Then we’ll Generate a custom query variable to insert in the search query box.

wp2

Build this custom query token with logged in user’s profile properties in the BuildTAQuery()

wp4

This is how the query text looks in the search web part

wp5

With this token in place your content is now targeted on the user’s profile attributes. The logged in user will now only see content which has been tagged to their location, role, and business unit.

Happy targeted coding!

Free Microsoft Training with the “Know it. Prove it.” Challenge

Know It. Prove It. 28 days to rock your tech skills.Microsoft Virtual Academy held the “Know it. Prove it.” 28-day challenge during the month of February 2015. The challenge was a month-long learning binge with 8 challenge tracks to choose from. Along with more than 55,000 people around the globe; I rocked the challenge during the month of February and leveled up my skills. As an overachiever, I actually completed 2 challenges and learned a lot. Even though the challenge is technically over, you can still commit to and complete these challenges, so there’s still plenty of time if you haven’t started one yet. Read the rest of this post »

What To Call Your My Site

Use “Your” instead of “My” when labeling things that are considered belonging to a user! Read the rest of this post »

On-Premises Claims Authorized SharePoint and Hybrid Apps in Azure

I recently needed to deploy a SharePoint-hosted App that would work in both SharePoint Online and On-Premises. My client had an Azure license, and we are hosting the App there. Now, how to get the On-Premises farm to work with my App? I started by reading this MSDN article on the subject.

This article had 90% of the information required, and as usual the other 10% is where the hair pulling happens. Here, I will attempt to fill in the other 10%.

  1. Patch your environment to the November 2014 CU for SharePoint Server. There are fixes in the August CU that affect this configuration and without them it will not work. Why the November CU then? Just take a look at the August install instructions and you will see why. If for some reason you cannot do the November CU the August will work, but set aside a day.
  2. Your Claims Provider class needs to implement the SupportsUserKey property, the GetClaimTypeForUserKey method and the GetUserKeyForEntity method. If you are using the Codeplex project Claims Provider Here and are using ADFS for your STS then you are fine. I had one that was upgraded from 2010 and had these methods and property missing and that left for lots of hair pulling.
    public override bool SupportsUserKey
    {
        get { return true; }
    }
    public override string GetClaimTypeForUserKey()
    {
        return Microsoft.IdentityModel.Claims.ClaimTypes.Upn;
    }
    protected override SPClaim GetUserKeyForEntity(SPClaim entity)
    {
        if (entity.ClaimType == this.GetClaimTypeForUserKey())
        {
            return entity;
        }
        else
        {
            string token = OperationContext.Current.RequestContext.RequestMessage.ToString();
            XmlNodeList claimList = GetClaimsList(token);
            XmlNode upn = claimList.OfType<XmlNode>().Where(c => c.Attributes["AttributeNamespace"].Value.ToLower() == "http://schemas.xmlsoap.org/claims" && c.Attributes["AttributeName"].Value.ToLower() == "upn").FirstOrDefault();
    
            return new SPClaim(Microsoft.IdentityModel.Claims.ClaimTypes.Upn, upn.InnerText, AdClaimValueType, SPOriginalIssuers.Format(SPOriginalIssuerType.TrustedProvider, SecureStoreClaimsSettings.Default.ProviderName));
        }
    }
    
  3. The User Profile Service needs to be completely set up and functioning. The OAuth procedure with Apps uses the UPA to match the string value of user ID from the token to look up and rehydrate a user in SharePoint so that it can operate on its behalf. If it can’t find the user in the UPA you will get a 401 when the app requests information.
  4. If, like me, you are working in a development environment and have deployed Apps that are now not working I would recommend deleting any App Catalogs and your App Management Service and rebuilding them as corrupted App installs were giving me some issues.
  5. The PowerShell scripts listed in the above article seemed to be a bit out of date. Steve Peschka made some updates to them on his blog, but the MSDN article does not seem to have those updates. I have combined the 4 steps listed in the article along with Steve’s updates into one script with step by step instructions that I hope will help the next guy. The scripts can be found here.
  6. Deploy your App to you App Catalog and cross all available limbs.

Sources for this post:

5 Ways the BI Experience in SharePoint is Evolving

A post on the Microsoft Office blog today entitled “Evolution of SharePoint”  grabbed my attention.  In it, Office Product Management team General Manager Julia White discussed ways the SharePoint platform is changing to fit its niche in the cloud and on premises.

As I read the article, I started thinking about how SharePoint BI has also evolved and is continuing to co-evolve with the host platform:

1) Less Excel, more Power BI

In SharePoint 2010, Excel Service and Power Pivot were big deals — not to mention the introduction of PerformancePoint Services.  By 2013, these same features had been streamlined for on-premises users, but SharePoint Online users kinda got the short end of the stick.  Enter Power BI, and the integration with Excel became even deeper with Power View and the BISM Connector providing additional functionality.   But now, Microsoft has basically unyoked Power BI from Excel with the introduction of Power BI Designer.

What exactly this means for SharePoint users is as yet unclear — especially those in the on-premises scenario.  One can expect that the Power Pivot Gallery will live on.  There are promises of being able to embed Power BI artifacts in SharePoint online pages or web apps, as well.  But what seems most likely is that a Power BI App will be made available to on-premises users of SharePoint 2016.

2) On-premises to Cloud

Progress marches on, and nowhere is that truer than in the BI realm.  From the long list of services and features provided to expand the BI experience in SharePoint 2013 on premises, we’ve seen the entire industry pivot to the cloud.  For SharePoint, this has essentially meant expansion of Office 365 and SharePoint Online in competition with the on-premises product.  And to date, it’s the cloud path has really gotten the most lavish attention from Microsoft with Power BI.  It remains to be seen how SharePoint 2016 will be positioned in that light, and whether we might see a new story for on-premises SharePoint BI take form.

3) Performance Point is dead

No, really.  I would bet one of my digits (although not a significant one, yuk yuk yuk) that PerformancePoint Services will be deprecated in SharePoint 2016.  We’ve already seen it dropped from the existing cloud offerings; if you want PPS in the cloud, you’ll need to run SharePoint on Azure VMs.  So, what takes its place?  Nothing in Power BI has the exact same feature set, but upcoming Power BI Dashboards (based on Power View) should be able to at least provide a visual analog — if not the sophisticated drilldown capability.

4) Mobile on the rise

You don’t have to be too perceptive to note the surge of importance in mobile.  SharePoint 2013 made major strides in terms of browser compatibility by moving strongly towards HTML 5 standards, thus improving the UX for mobile users. SharePoint 2016 is strongly expected to be fully HTML 5 compliant, and to improve that mobile experience even more.  Similarly on the BI side, while the initial release of Power View was not HTML 5 based, Microsoft has made good on their promise to rebuild included visualizations to be HTML5 based.  The recent release of Power BI apps for iOS devices underlines the desire for the service to be both platform and device agnostic.  Basically, we are seeing Microsoft bend these platforms to the way usage patterns are changing.  Count on both SharePoint and Power BI to continue in that vein.

5) App Oriented

Based on what we are seeing from Microsoft, it appears that we can expect SharePoint to become more app-centric — both in the Cloud and On-Premises contexts.  SharePoint 2016 is rumored to include a manifestation of an App store.  Power BI Sites is a SharePoint Online app and, as mentioned above, I would expect a version of that app might be made available for on-premises SharePoint 2016.  Add to this the embracing of mobile, and an App based approach seems to be the best choice an increasing number of scenarios.

Overall, the direction for both SharePoint and Power BI is clearly to the Cloud.  Old tools and approaches are being turned over in favor of new ones.  And there is some uncertainty resulting from that for on-premises users of SharePoint.  But Microsoft seems to be standing by the platform no matter what, so I would expect to get a better idea of the BI story for SharePoint 2016 as CTP versions start hitting the Web.

 

 

 

How Delve Makes your Life Easier!

For some time now Microsoft has been working on an intelligent fabric- machine learning. This algorithm is (now more than ever) becoming an Delve Img1integral part of many new platforms and products, especially office graph which powers the new Office app called “Delve”. Delve is part of the Office 365 suite and is available for all tenants with “First Release” turned on.

I blogged about Delve in its early days here & here  but since then it has evolved quite a bit. What I wanted to share with you is how Microsoft is rolling new functionality into this app so that life for an end user becomes simpler. There are many aspects when we look into a “day in the life” of an end user but one of the most important ones is organizing and email. Won’t you agree? Taking these two in consideration, let’s look at how Delve makes your everyday life easier!

But before we look into the new enhancements, let’s take a small walk down the memory lane and see what is Delve. Office Delve brings most relevant content to you. This is based on what you’re working on and what is trending around you (your connections, groups etc.). Helps you discover new connection, be it People, documents, or new ideas. All this is done by Delve constantly learning your work habits/styles and creating a globe of information in and around you. Office Graph incorporated signals across Office 365 and content primarily from OneDrive for Business, SharePoint Online team sites and the new Office 365 Video portal.

Now let’s explore the latest enhancements that has been keeping the Delve team pretty busy.

Boards

This feature helps you organize various content and make it readily accessible and share friendly. Think of this as the same exercise you are Image 001used to, of applying sticky on a board to gather all relevant ideas and suggestions. This feature takes this traditional approach, digital.

Image 002Everyone in your organization can view and contribute to an existing board or create a board—but they can only see and open documents that they have permission to access.  From within Delve, you can search for a board, follow it to stay informed and discover other boards—all without having to know or remember where individual pieces of content live. Watch this youtube video to get a better idea.

Image 003


Gotchas
:

Boards does not allow you to embed external pages yet; so in essence no public boards!
Currently you cannot add context to the content on a public board. It’s simply pinning a document without any comment or context around it. (Sounds like a yammer integration in the play here)

Image 004

Email

I bet you would not disagree with me when I say email is single handedly the most used/abused application today. People use it to share ideas, circulate announcements, send attachments etc. This is a the latest in the list of additions to Delve. On the Delve home page, attachments found in email show up in the “Home” view. The attachments are presented in cards that provide some context including information about who sent the message and some text from the message body. If a message contains multiple attachments, each attachment is presented in a separate card.

Gotchas:
It won’t show you attachments sent by you.
Attachments will only show in the two week time frame. Delve will show items that are of interest to you based on insights it has gathered and analyzed in the Office Graph database. The same kind of signal-driven rationale is used to surface documents stored in SharePoint and OneDrive for Business libraries.
You obviously can’t delete items from Delve – that’s due to the reason that Delve is a machine learning algorithm based on search.

Overall great additions to the Delve family. I’m certainly looking forward to the next one – Yammer integration.

 

 

Image source: Microsoft Office blog

The (updated) SharePoint app model development approach

I was recently invited to attend a session at the Microsoft campus in Redmond titled “Transitioning SharePoint Full Trust Code to Application Model Solutions Airlift”.  So, aside from the long title, what exactly was this session going to provide?  I did get a chance to see the preliminary agenda so I did have some idea what the main topics were, but I still wasn’t exactly clear on what I was going to get out of this.  Nevertheless, I was intrigued and knew from the agenda that there were some great topics being discussed so I made my travel arrangements and headed to Redmond.  Little did I know at that time that I was about to attend a session that really put things into perspective with the current state of SharePoint and change how I think about approaching both on-prem and SharePoint Online projects going forward.  In this post, I will go over the key topics that I took away from these sessions and the recommended guidance to address these topics.

airlift intro

At a high level, the primary goal was to bring partners and clients up to speed on converting SharePoint Full Trust Code (FTC) to app model.  Topics ranged from initial deployment, to maintenance, upgrades, migrations, etc., the whole gambit, essentially.  I have been following the Office 365 Developer Patterns and Practices Team (PnP) for some time so I did have some idea of this before the event, but after sitting through the sessions, going through the labs, and talking with others at the event, it really put things into perspective and made me realize the paradigm shift the platform started with SharePoint 2013 and how important it is to get on board now, even if you’re an on-prem customer.

App model != apps/app parts/app webs

When SharePoint 2013 was making its debut, SharePoint apps were all the rage… many a session was attended discussing SharePoint apps, app webs, host webs, etc.  What seems to have gotten lost in a lot of that shuffle was the focus on the app model and not just SharePoint apps.  It seems that Microsoft is aware of this and the PnP team is trying to help guide everyone to focus on app model (client side code) and not just SharePoint apps.  While apps have their place, they are not the star in my mind and too much focus has been around apps in general since SharePoint 2013 was released.  Focusing on the app model in general (not just apps!) is key and, for those more involve with ECM and Intranet style projects, it’s necessary since apps don’t always have the best fit with those types of projects.

Read the rest of this post »