PnP-SP-Starter-Kit Hints and Tips

If you are like me, you followed all of the updates at SharePoint Conference North America 2018 and you heard about an awesome new starter pack created by the PnP Team, and you couldn’t wait to install it and deploy it into your environment.  You can find the Starter Kit here.

If you follow through the GitHub docs you may find that the set up guidance isn’t there yet… don’t worry, more documentation is coming sometime in the beginning of June. However, I am impatient and I wanted to see all of the cool things inside the starter kit! When I first started, I found myself seeing some errors and issues when trying to provision and load the files.

Please note, this blog post isn’t official documentation,  nor am I a part of the PnP team… but these are just some issues I have seen as I’ve started exploring. You may want to wait for the official documentation to be released… as this is entirely brand new!

Foreword

What is important to know is that this solution is an all encompassing solution. It provides you with web parts, customizers, site designs, MSGraphClient configuration, a hub site, lists, content types, a sample LOB application and more. This might be the most exhaustive example of modern SharePoint provisioning I have seen. There really is an impressive amount of work that was put into this! Kudos to the team and community for putting this together.

A few Hints

Downloading the Project

Downloading the project is quite simple, assuming you’ve developed SPFx before. If you haven’t, you may want to spend some time setting up your development environment.

To download the project, navigate to the starter kit from the link above. You can clone this repository to your local machine using the Github UI.

Clone

Or, you can use the following git commands

git clone https://github.com/SharePoint/sp-starter-kit/

Folder Structure

Looking at the image above, you can see the what the folder structure looks like. The web parts and customizers and other SPFx code is listed within the Solution folder. If you wanted to just manually deploy these assets instead of everything else within the starter pack, you could do so by navigating to the solution folder using command line, and running the following commands.

npm i
gulp bundle –ship
gulp package-solution –ship

This will create your sppkg file for your solution. These are built using the new ClientSideAssets… For more information on the deployment of SPFx solutions, follow this link.

If you’d like to know how the starter kit gets provisioned, you’d want to look into the provisioning folder. The readme file will let you know how to deploy the starter kit.

Update your PnPPowerShell module

You’ll want to update your PnPPowerShell module to the latest version. In order to do this, open up Powershell and execute the following command.

Update-Module SharePointPnPPowerShell*

Deploy the starter kit

To deploy the starter kit,  the first thing you must do is build the SharePoint Framework solution using the following commands from within the solution folder.

npm i
 gulp bundle --ship
 gulp package-solution --ship

The deploy.ps1 should be handling this for you, but an error is causing it to build improperly. I am told this code should be fixed over the weekend.

Then open up Powershell and navigate to your provisioning folder. Once inside the folder, execute the following command to start the provisioning process.

.\deploy.ps1 -TenantUrl https://YourTenant.sharepoint.com -WeatherCity "Denver"

The WeatherCity parameter is for the weather web part 🙂

When you execute this command, you’ll notice a ton of actions happen. The solution is going to create a couple demo sites for you. “Demo_Portal”, “Demo_hr”, “Demo_Marketing”. The script is going to create the Demo_Portal site as a hub site, and connect the other two sites to it.

The script will then deploy your SPFx package into your app catalog, and subsequently install the app package on the sites that are being created. It will then create two site designs for Team sites and for a Communication site, and then create new navigation elements for your hub sites.

The deployment script will also create a handful of pages for your Portal site and automatically provision the web parts to the page. This is just the start… the deployment script actually provisions and exhaustive set of functionality, however this post isn’t about all of the functionality. 🙂 Have a look yourself and see what it provisions!

Apply-PnPProvisioningTemplate Error

Apply-PnPProvisioningTemplate : Object reference not set to an instance of an object. At C:\Users\beaucameron\spfx\sp-starter-kit\provisioning\deploy.ps1:96 char:5

This will likely be the first error you see when trying to deploy the solution. As mentioned, the script may not be creating the .sppkg file as expected. If you haven’t manually built the .sppkg package as mentioned above in “Deploy the starter kit”, do so now. Once you have packaged the solution, re-run the deploy.ps1.

App Package Not Valid

Apparently some people have been unable to deploy the solution to the app catalog and receive an error that the app package is not valid. Garry Trinder mentioned this issue, and so far others have confirmed that it is because API Management configuration is missing from your admin center. If this error happens for you and you are also missing API Management from the new Admin Center could you let me know (confirmation)?

In order to add API Management to your admin center, you must enable “Targeted Release” for your tenant, instead of specific users. It may not be immediate and may take a few hours for the changes to propagate to your tenant. When doing this, you should do it on a non-production tenant.

My navigation isn’t showing up

One of things you may notice after deploying the starter kit, is that the hub navigation doesn’t work. In general, hub navigation is a bit finicky but a simple way to make the navigation show up is by editing the navigation and cancelling out… or just wait for it to fix itself (caching).

navigation.png

Personal Web Parts aren’t loading

If you navigate to the personal page in the navigation, it brings you to a really awesome page with a bunch of SPFx web parts on it that utilize Microsoft Graph. These web parts include:

  • Upcoming Meetings,
  • My Tasks
  • Personal Contacts
  • Personal Email
  • Recent Documents
  • Recent Sites

You may find the personal web parts aren’t loading correctly, here are some possible reasons.

 

Access is denied. Check credentials and try again.

accessdenied.png

You may find that your personal web parts, aren’t loading at all and showing you that your credentials are invalid. This is because (at least in my environment), you need to explicitly give permission to the SPFx web parts to have access to the Microsoft Graph. If you navigate to the new admin center, https://yoursite-admin.sharepoint.com/_layouts/15/online/AdminHome.aspx on the left hand side, select API Management under Advanced. You’ll see a list of pending approvals for the new applications. Approve this request and your web parts will start working!

APIManagement.png

 

User login is required

If you’ve configured the permissions in API management, you may find that the web parts still aren’t loading.

User login is required

It appears there is a bug (race condition?) that has effected acquiring a token for the AadHttpClient/MSGraphClient. Creating a new page and/or workbench, may allow you to see the web part temporarily. However, the bug/issue still exists and is linked below.

Emails.png

I found there is a support ticket on this issue which can be found on GitHub, issue 1810.

I have no Alerts

One of the cool application customizers deployed with this starter pack is a top header that shows configurable alerts. This is one of the only lists that doesn’t pre-populate with data through the deployment process. If you’d like to test it out, navigate to site contents and add some alerts to the Alerts list!

Alerts

Once you have, you should be able to refresh your page see the alerts show up on your modern pages!

AlertDialog

 

More…

If you’d like to know more of the features that are included in the starter kit, Robert Shouten has made a great post outlining the web parts and functionality here.

Disclaimer

Once again, I’d like to re-iterate that this isn’t any official documentation and that more documentation will be coming from the team about how to provision the starter the pack. I hope this might be helpful to the people like me, who are impatient and can’t wait for the documentation to come out! 🙂

Thanks to the PnP team and Vesa for all their continued effort. Sharing is caring.

My favorite updates from SharePoint Conference 2018 Keynote

It’s finally here! SharePoint Conference 2018 kicked off today with a load of new features that we all should be excited to hear about! In this post we’ll do a quick run down from the  Keynote at the SharePoint Conference.

This isn’t a complete list of updates, frankly there are too many! However, here is a list of my favorites so far.

OneDrive

Mobile Devices
  • The ability to scan in documents, receipts from your mobile device and immediately upload the document to OneDrive.
  • Back up your camera roll from your mobile device directly to your personal OneDrive and your business OneDrive!

Search

As previously shown at Ignite 2017, new search features are powered by AI and Machine Learning. What this means is that SharePoint, Office 365 and Microsoft 365 will now provide a personalized search based on commonly visited content, content relevant to you and more.

SharePoint Team Sites

Document Libraries
  • Real time changes to libraries and lists! When colleagues change data in the lists, it will instantly change for you without refreshing the page!
Document Library Web Parts
  • Web Parts will now support Drag & Drop, Filtering, Sorting and grouping functionality.
  • Column Formatting JSON
    • Users can now bring in rich KPIs they built on a document library and use those features in a page through the document library web part.

SharePoint Lists

SharePoint lists are getting revamped in an effort to make lists easier for your users. This includes a modern UI for building lists based on existing lists in your site.

  • Provide the ability to create a list  and automatically bring over Flows and PowerApps into your new list based on the previous list.
    • Lists
  • Real time updates
    • You will be able to see updates immediately as other team members are updating and modifying the list.
    • You will not need to use refresh to see the latest list updates
  • Paste from Excel
    • You will be able to take an excel table and paste it into a SharePoint list.
    • Lists will create columns for you if they are missing from the SharePoint list.
  • PowerBI
    • PowerBI will be able to be integrated with your SharePoint lists using machine learning and AI to built real time analysis of the data in your lists!

SharePoint Communication Sites

SharePoint Pages
  • Tag pages with metadata
    • Ability to tag pages with metadata such as Region, Role, Activity. These values are just columns on the SharePoint library which allow you to create web parts to filter pages within your organization.
  • Page Approval workflow
    • A new page approval workflow is powered by Microsoft Flow
    • Can be customized to meet your approval needs!
    • Can be approved via from the approval panel in SharePoint or from within an actionable email.
Microsoft Stream
  • Microsoft stream now transcribes the video for easier searchability of your videos.
SharePoint News
  • Publish news from SharePoint to Microsoft Teams, to the SharePoint mobile app or directly to email!
  • News Scheduling & publishing
    • The ability to not only publish News via a scheduled date
New Web Parts
  • Weather Web Part (giggle)
  • Microsoft Training Services
    • Delivers content directly to your intranet. Content is delivered from Azure and provides all the training users may be interested in to be showed on your SharePoint Pages.
  • Hinted at more…

Hub Sites

Site Scripts
  • The ability to run site scripts when adding new sites to a hub. This will allow you to run custom logic such as creating new lists or even managing permissions immediately as a site joins a hub site.

SharePoint Development

SharePoint Development using SharePoint Framework will now be cross platform. That is, web parts you built in SharePoint using the SharePoint Framework (SPFx) will now be able to be used in Microsoft Teams

Microsoft Teams

  • New Tab Features
    • Will support the new document library web part as well. So when users are inside Microsoft teams, they can now drag and drop, filter and use column formatting directly within Microsoft Teams.
    • Will also support SharePoint pages within your Microsoft Teams tabs. This will make it much easier for users to stay organized and focus on work, without ever having to leave Microsoft Teams.
    • Will support SPFx web parts as new tabs.

Microsoft Flow

  • SharePoint Integration for managing Business Critical Data
    • When adding content & images to a SharePoint library, Microsoft flow can be used to run Text Analysis to figure out important metadata and information that is relevant to the document. This information could be location a photo was taken, common words found in the document or library and automatically tag your content!

SharePoint On-premises

  • Modern UI will be coming to SharePoint 2019
    • SharePoint Home
    • Modern Team and Communication Sites
    • Modern Lists and Libraries
    • New Modern authoring canvas for SharePoint pages.

Looking for more updates on SharePoint 2019? Check out my good friend Nick Brattoli’s post on all the super awesome features coming to on-premises! https://collab365.community/sharepoint-2019-features-announced/

 

 

OCR Support in Office 365

Last year at Ignite, Microsoft announced OCR capability using “computer vision technology” would be coming to Office 365! This stirred up a lot of excitement as this was a feature many people have been wanting for years! Microsoft posted an article at techcommunity about the new advancement in Intelligent Search using OCR which can be found here. Well I am happy to say it exists and it sure is awesome!

Supported Types

Per the techcommunity article above, the supported types are “bmp”, “png”, “jpeg”, “jpg”, “gif”, “tif”, “tiff”, “raw”, and also “arw”, “cr2”, “crw”, “erf”, “mef”, “mrw”, “nef”, “nrw”, “orf”, “pef”, “rw2”, “rw1”, “sr2”.

To test this capability, I have uploaded a mock up design for a Help Desk Add-In I have built for Office 365 into a Document library.

SupportTicket

The jpg looks like this

HelpDesk

You’ll notice inside the image there are 4 tickets have been mocked up with a bit of bacon ipsum. The ticket titles are “Trouble with SharePoint”, “Computer not Working”, “No Trouble Just Saying Hi” and “Trouble with SharePoint” again.  My plan to test out OCR is to search for the contents of that Title using SharePoint search!

Test: Search for Ticket values

My first test will be trying to find one of the tickets labeled “Trouble with SharePoint” and look at the results! Not only does it match with the values in the image, but it’s also picking up the other ticket values as well.

 

SearchResult

It should be no surprise that when I search for some of the description of the tickets, that they should return in search results as well. I’ve decided to search for the first sentence of the description in the mock up. Here is the result!

SearchResult2Does it work in Modern too?

In my previous examples I was using SharePoint Classic Search. If you were wondering if it works in Modern search as well, you bet!

modernsearchHow does it work?

My guess is that OCR in SharePoint is using Azure Media Services to convert text content in digital files into digital text. The reason for assuming this is because of the following naming convention used in SharePoint.

Whenever SharePoint finds text within your images, the values get stored on the item in a field called MediaServiceOCR. Take a look at the JSON response from querying for the list item.

MediaServiceOCR

I wasn’t able to find a default managed property for this field but that isn’t a huge problem because SharePoint automatically creates a crawled property called ows_MediaServiceOCR. Using this crawled property, I can create whatever managed property mappings that I want.

Crawled.png

 

Some Comments

OCR PDFs have native support in Office 365. However, scanned documents which are PDFs currently aren’t generating values in the MediaServiceOCR column. I’ve been testing this functionality with no success — yet.

I have noticed some inconsistencies with the OCR functionality. I have tested this on multiple libraries and I have noticed it hasn’t been creating the MediaServiceOCR values on some items (doesn’t exist). I’ll keep you posted when I find more information about this.

 

 

So your hub site settings aren’t showing up in Office 365?

Hub sites have been released to Office 365 Targeted Release tenants. With all of the excitement, everyone has been jumping to powershell and adding hub sites to their tenancies!

Register-SPOHubSite https://mysite.sharepoint.com/sites/Hubsite

However, some have noticed that even though the powershell commands appear to be working, you may notice that your navigation is missing or the hub site settings are not appearing in the UI. The reason is simple, and thanks to @dmadelung for reminding me… you need to make sure that your release preferences in the Office 365 admin center are set to “Targeted release for everyone”.

ReleasePreference

If you’d like more tips and tricks on hub sites, head over to Marc Anderson’s post!

Thanks and happy hubbing!