Mirror your iPhone on Windows via USB

In a couple of days I’ll be presenting at the Microsoft TechDays 2016 in the Netherlands. While preparing my sessions on PowerApps, I wanted to mirrow/project my iPhone to my Windows PC for demo purpose. Since the wireless networks at conferences can be flaky I did not want to use that connect. To ensure my demo would work I wanted a solid connection by using the USB cable.

LonelyScreenMirrorIphone

LonelyScreen open source to the rescue

I managed to hook up my iPhone (or iPad) to my Windows PC via USB by using the open source tool LonelyScreen. The most common scenario for mirroring your iPhone is via AirPlay over wireless. Which works fine for LonelyScreen, but does not fit my need!

How mirror your iPhone over USB?

There are a couple of additional steps you need to mirror over USB. You need to setup a network connecting between your iPhone and Windows. This can be done by enabling the Personal Hotspot. This will create a network connection allowing to interact with LonelyScreen.

  1. Plug in the USB cable into your iPhone and Windows PC
  2. Open Settings
    LonelyScreenMirrorIphone-1
  3. Tap on Personal Hotspot
    LonelyScreenMirrorIphone-2
  4. Enable Personal Hotspot
    LonelyScreenMirrorIphone-3
  5. Start LonelyScreen on your Windows PC
    LonelyScreenMirrorIphoneStartScreen
  6. Mirror your iPhone via AirPlay to your PC
    LonelyScreenMirrorIphone-4
  7. Now your iPhone should be shown on LonelyScreen
    LonelyScreenMirrorIphone

OneDrive for Business roadmap

[Update May 2 – updated roadmap based on feedback]

OneDrive for Business workload supports the personal storage capability for users. It enables users to store work related personal files and easily share them with colleagues or external users.

Offline synchronization is one of the many benefits OneDrive for Business is providing. With the introduction of the Next Generation Sync Client this has become more stable and reliable!

The roadmap for OneDrive for Business is changing very rapidly. Below you will find a roadmap and related resources for the current roadmap. Although I try to get the list to reflect the current and upcoming releases, I cannot guarantee it is a 100% correct. Please comment if you have feedback!

Roadmap

2015 Q4

  • OneDrive for Business Next Generation Sync Client (NGSC) release
  • Support for Office 365 OneDrive for Business (personal storage)

2016 Q1

  • Drive discovery and recent files view in browser client
  • Curate the "Share with Me" view
  • Windows 8.1 support (Windows OS support: 7, 8, 8.1 and 10)
  • Improved setup + Seamless client migration
  • Sync any file type you want
  • Performance and reliability improvements
  • Streamlined Microsoft Account (MSA) creation
  • Auditing & Activity reporting
  • Deny list of file types for sync
  • Customer lockbox
  • External sharing domain allow/deny list
  • Link expiration IT controls

2016 Q2

  • DLP support for mobile apps (end of April)
  • PDF annotation support for Android (end of April)
  • Outlook Mobile iOS integration (early May)
  • iOS access to SharePoint Online files
  • Bandwidth throttling controls for sync
  • Office 2016 integration (rolling out during the course of the summer)
  • Pause Sync (rolling out during the course of the summer)

2016 Q4

  • Sync of shared folders (TAP program starts in Q3)
  • Sync of SharePoint document libraries (TAP program start in Q3)

Committed

The items below are committed by engineering but do not have a timeline yet. The planning is in progress.

  • Notifications
  • Extended Windows Explorer integration
  • SharePoint on-prem support for iOS
  • Android access to SharePoint Online files "Shared by Me" view
  • Removal of #, % blocked characters
  • Max path length increase
  • Differential and RMS sync support
  • AAD Conditional Access for NGSC

Resources

The roadmap is based on the following resources available.

Deep Dive Office 365 API for SharePoint Sites service

Yesterday another DIWUG event! This is a monthly community event in The Netherlands. Albert-Jan Schot (Appie) did a presentation on the Office 365 Groups and I presented a session about the Office 365 API for SharePoint Sites service.

You can find my slide deck on SlideShare, http://www.slideshare.net/bramdejager/deep-dive-into-office-365-apis-for-sharepoint-site-services.

All demos together resulted in a single code base which you can download here.

How do the Office 365 app launcher and subscription relate?

By assigning licenses/subsciptions (previous post) in Office 365 services are enabled per user. Most of the services are accessible via the App Laucher. The challenge is enabling a single service for example Office 365 Video. This is challenging due to the relationship between services bound by a subscription/license.

NOTE: please note this article is written on February 16, 2016. The subscription structure might change after this date, please verify in the Office 365 Admin Center if this is still applicable.

Office365AppLauncher

Which App Launcher tiles show up by enabling Office 365 services

By enabling services new tiles can show up in the App Launcher. When enabling services for users you want to know which services are enabled to provide the proper training and increase user adoption.

Service App Launcher tile
Sway image
Mobile Device Management for Office 365‎ No tile
Yammer Enterprise image
Azure Rights Management No tile
Office 365 ProPlus No tile
Skype for Business Online ‎(Plan 2)‎ No tile
Office Online image
SharePoint Online ‎(Plan 2) image
Exchange Online ‎(Plan 2) image
Power BI image
Office 365 Planner image
Project Pro for Office 365 image

Microsoft PowerApps

image

Can you granularly enable SharePoint Online services?

Yes, you can granularly enable SharePoint Online services if this is required! Maybe “Yes” is not completely true. Let me explain.

Why is SharePoint Online different than other licences in Office 365? Just because… No idea, lets hope Microsoft will change this soon and let us more granalar enable or disable services based on licenses. But we do have a choice!

Some companies might require to enable OneDrive for Business but not yet enable Delve, Video and Sites. We can not cover this scenario completely, we have the following options:

  • We can show or hide the OneDrive and/or Sites tiles
  • We can enable or disable the Delve and/or Video services

In the SharePoint Admin Center, under “Settings”, an admin can make changes to these services. It might take a while before the changes are reflected in the user interface, please be aware.

Office365SharePointOnlineOptions

Hiding OneDrive for Business and Sites

By hiding OneDrive for Business the tile is removed from the App Launcher, but the service is still available! By using a direct URL (https://company-my.sharepoint.com) you can still access OneDrive for Business and use your personal storage.

By hiding Sites, simular behavior will occur as OneDrive for Business. The tile is hiden from the App Launcher but by directly accessing the link https://company-my.sharepoint.com/personal/useraccount/Social/Sites.aspx the Sites page is still accessible.

Disabling Office Graph (Delve)

Disabling the Office Graph “Don’t allow access to the Office Graph” will not completely disable Delve, but will disable using the Office Graph (the backend of Delve). The Delve user profile page is accessible and needs to be! When user will click on a user profile link they will be brought to the Delve profile page.

The options like “Home”, “Favorites”, “People” and “Boards” are not accessible.

Office365DisableDelve

Disabling Office 365 Video

When disabling Office 365 Video the tile is removed from the App Launcher and when a user tries to access the Office 365 Video page via the link https://macawbram0013.sharepoint.com/portals/hub then a friendly message is shown.

Office365DisableVideo

Office 365 licenses under the hood

Sometime you see Office 365 services for one user, but their colleague sitting next to them is not seeing this service?! Where can you find your assigned licenses to know which services you are able use? And where does your administrator assign these licenses?

NOTE: please note this article is written on February 16, 2016. The subscription structure might change after this date, please verify in the Office 365 Admin Center if this is still applicable.

Where can I find my Office 365 licenses?

To check the licenses assigned to your personal account visit the page https://portal.office.com/account/#subscriptions. This page shows the assigned subscriptions/licenses together with the services enabled per license.

Office365AccountSubscriptionsExtende[2]

Where does my admin assign licences?

Assigning licenses is done by the Office 365 administrator in the Office 365 Admin Center. You need to have the appropiate role to access the “Active Users”-page.

Office365AdminCenterLicenses_thumb1

Assigning licenses and enabling services

The Office 365 subscription plan is the basic license which a user requires to access services in Office 365. Microsoft provides different Office 365 Business plans but in this article I use the Enterprise E3 license as an example.

The Enterprise E3 license includes the following services, which can be enabled or disabled on a per user base. By enabling and/or disabling the service the App Launcher is impacted. Some services have an impact on more than one App Launcher tile. Next to the Enterprise E3 license other licenses are included as well in the list below.

  • Office 365 Enterprise E3
    • Sway
    • Mobile Device Management for Office 365‎
    • Yammer Enterprise
    • Azure Rights Management
    • Office 365 ProPlus
    • Skype for Business Online ‎(Plan 2)‎
    • Office Online
    • SharePoint Online ‎(Plan 2)‎
    • Exchange Online ‎(Plan 2)
  • Office 365 Planner
    • Office 365 Planner Preview
  • Project Pro for Office 365
    • Project Pro for Office 365
  • Microsoft Power BI for Office 365
    • Yammer Enterprise
    • Microsoft Power BI Information Services Plan 1
    • Microsoft Power BI Reporting and Analytics Plan 1
  • Microsoft PowerApps
    • Microsoft Power Videos Basic
    • Microsoft Power Flows Basic
    • Microsoft PowerApps

How to download video offline from Office 365 Video

Office 365 Video is a media sharing solution which is part of Office 365. It allows users to upload, play, share, embed, group in channels and manage their videos. The feature which is currently missing is downloading a video.

Under the hood

To get to the part of downloading the video we need to understand what is happening under the hood of Office 365 Video. Videos are grouped in channels. For each channel a site collection is created. This is not shown to the end user but is mandatory information to actually download the video. All videos are uploaded to this site collection in an Assets library. This library is accessible via the browser!

Download the video

We know now that the videos are part of a Assets library. How do we know where this Assets library is located? This is fairly easy, because the name of the channel is the name of the site collection.

For example our channel is named “Corporate News”. The underlying site collection has the URL https://company.sharepoint.com/portals/corporate%20news. Via the settings menu we can navigate to “Site Contents” and click on the Assets library. Although the name is has a technical reference, thus not really readable. The Assets library name for the videos is “

$Resources:cmscore,PointPublishingListNameRootVideos;”.

Office 365 Video channel site contents

Luckily the URL to the Assets library is more straight forward https://company.sharepoint.com/portals/corporate%20news/pVid/Forms/Thumbnails.aspx.

Downloading the video is simple, just select the video and use the context menu and click “Download”.

Office 365 Video assets library, download a video

Office 365, where can I find my assigned license?

In Office 365 users require licenses for making use of the products. This is similar as on-premises. The corporate administrator assigns licenses in the Office 365 Admin Center or uses PowerShell for automation purpose.

Office 365 Admin Center - Assign License

The challenge I faced was around getting insights into the licenses which were assigned to me as an user. Most of the times I have access to the Office 365 Admin Center due to my role as consultant. But now I don’t have access, but there is still a way to see my assigned licenses.

The screenshot above shows the Office 365 Admin Center – Active Users page where licenses can be assigned to users. The link is https://portal.office.com/Admin/Default.aspx#ActiveUsersPage.

The user “admin admin” has all licenses assigned. Although he has access to the Office 365 Admin Center he can see his licenses from the new Office 365 Profile Page. Check out your assigned licenses at https://portal.office.com/profile.

Office 365 - Profile Page (assigned licenses)

The SharePoint CSOM assemblies and the “The specified module could not be found” error

When working on my community project SharePoint Client Browser I received multiple times the issue which related to the error message “The specified module could not be found”. The error log shows the error is thrown while authenticating with SharePoint Online.

File '' not found, check log file for detailed information. System.IO.FileNotFoundException: The specified module could not be found. (Exception from HRESULT: 0x8007007E) at Microsoft.SharePoint.Client.Idcrl.ManagedIdcrl.EnsureInited() at Microsoft.SharePoint.Client.Idcrl.ManagedIdcrl.LogonIdentity(String username, SecureString password) at Microsoft.SharePoint.Client.SharePointOnlineCredentials..ctor(String username, SecureString password) at SPBrowser.Entities.TenantAuthentication.InitClientContext()

What is weird about this, although a FileNotFoundException is thrown, the exception details do not indicate which file is actually missing. #Fail!

What also did not help with resolving my issue was missing automated packaging of the SharePoint Client Browser tool. This is definitely one of those reasons to automate your build process. To ensure the package contains everything it needs, instead of missing a single file due to manual packaging.

So, we do we actually need? When building a solution based on the SharePoint CSOM we require a set of assemblies. Depending we are building for SharePoint 2013 (v15) or SharePoint Online (v16) we need a different set. But what was causing the issue was not one of the CSOM assemblies!

Required assemblies for both SharePoint v15 and v16:

  • MSOIDCLIL.DLL
  • MSOIDRES.DLL

SharePoint CSOM assemblies:

  • Microsoft.SharePoint.Client.dll
  • Microsoft.SharePoint.Client.Runtime.dll
  • Microsoft.SharePoint.Client.Taxonomy.dll

Whatever you release in a package, make sure you include the MSOIDCLIL.DLL and MSOIDRES.DLL assemblies!

Enable ULS logging during App deployment

Troubleshooting is always afterwards, meaning you need logging information to backtrack the origin of the errors. But normally the logging level is set to default and the actual interesting data is missing from the ULS logs.

This post provides an approach to enable logging before deploying your apps and reverting to the default afterwards.

Before making changes to the ULS diagnostic settings you want to backup/export your settings. Doing this from the Central Administration is not your preferred way or you must love to copy and past a lot.

LoggingInCentralAdmin

Export the diagnostic logging levels

You can easy export your settings by using PowerShell. Below a script which exports the diagnostic settings for the ULS logging levels. This script will export the logging levels to a CSV-file.

Get-SPLogLevel | Export-Csv "$($env:USERPROFILE)\Downloads\$((Get-Date).ToString("yyMMddHHmmss"))_LogLevels.csv" -NoTypeInformation

After opening the export in Excel, you get the data shown below.

ExportLoggingLevelsInExcel

Use PowerShell to get and/or update logging level

To get and/or update a particular log level via PowerShell you need to know how to scope the identity of the logging level. Once you know it, it’s pretty simple! The identifier is a combination of Area and Name.

Get-SPLogLevel -Identity "Search:General"

Change logging levels for App deployment

The general steps you want to include in your deployment scripts is based on lowering the logging for a predefined set of logging levels. Next execute the deployment and afterwards revert to the default.

  • Lower logging levels to Verbose
  • Execute deployment
  • Revert to default logging levels

Download the full PowerShell script here.

Lower the logging levels to Verbose

Below you find a script which sets a predefined set of logging levels. This set can be used as a basic for every deployment or configuration change. It is not set in stone that this is all you need, please update it to fit your needs.

Set-SPLogLevel -identity 'Search:Logging Correlation Data' -EventSeverity Verbose -TraceSeverity Verbose Set-SPLogLevel -identity 'SharePoint Foundation:Logging Correlation Data' -EventSeverity Verbose -TraceSeverity Verbose Set-SPLogLevel -identity 'SharePoint Server:Logging Correlation Data' -EventSeverity Verbose -TraceSeverity Verbose Set-SPLogLevel -identity 'SharePoint Foundation:Configuration' -EventSeverity Verbose -TraceSeverity Verbose Set-SPLogLevel -identity 'SharePoint Foundation:Database' -EventSeverity Verbose -TraceSeverity Verbose Set-SPLogLevel -identity 'SharePoint Foundation:Feature Infrastructure' -EventSeverity Verbose -TraceSeverity Verbose Set-SPLogLevel -identity 'SharePoint Foundation:General' -EventSeverity Verbose -TraceSeverity Verbose Set-SPLogLevel -identity 'SharePoint Foundation:Timer' -EventSeverity Verbose -TraceSeverity Verbose Set-SPLogLevel -identity 'SharePoint Foundation:Topology' -EventSeverity Verbose -TraceSeverity Verbose Set-SPLogLevel -identity 'SharePoint Foundation:Upgrade' -EventSeverity Verbose -TraceSeverity Verbose Set-SPLogLevel -identity 'SharePoint Foundation:PowerShell' -EventSeverity Verbose -TraceSeverity Verbose Set-SPLogLevel -identity 'SharePoint Foundation:App Deployment' -EventSeverity Verbose -TraceSeverity Verbose Set-SPLogLevel -identity 'SharePoint Foundation:App Management' -EventSeverity Verbose -TraceSeverity Verbose Set-SPLogLevel -identity 'SharePoint Foundation:App Marketplace' -EventSeverity Verbose -TraceSeverity Verbose Set-SPLogLevel -identity 'SharePoint Foundation:Application Authentication' -EventSeverity Verbose -TraceSeverity Verbose Set-SPLogLevel -identity 'SharePoint Foundation:Authentication Authorization' -EventSeverity Verbose -TraceSeverity Verbose Set-SPLogLevel -identity 'SharePoint Foundation:CSOM' -EventSeverity Verbose -TraceSeverity Verbose Set-SPLogLevel -identity 'SharePoint Foundation:CSOM Api' -EventSeverity Verbose -TraceSeverity Verbose Set-SPLogLevel -identity 'SharePoint Foundation:App Hosting Quota Management' -EventSeverity Verbose -TraceSeverity Verbose Set-SPLogLevel -identity 'SharePoint Foundation:App Monitoring' -EventSeverity Verbose -TraceSeverity Verbose Set-SPLogLevel -identity 'SharePoint Foundation:App Auth' -EventSeverity Verbose -TraceSeverity Verbose Set-SPLogLevel -identity 'SharePoint Portal Server:Runtime' -EventSeverity Verbose -TraceSeverity Verbose Set-SPLogLevel -identity 'SharePoint Portal Server:Long Running Operation' -EventSeverity Verbose -TraceSeverity Verbose Set-SPLogLevel -identity 'SharePoint Server:General' -EventSeverity Verbose -TraceSeverity Verbose Set-SPLogLevel -identity 'SharePoint Server:Setup and Upgrade' -EventSeverity Verbose -TraceSeverity Verbose Set-SPLogLevel -identity 'SharePoint Server:Database' -EventSeverity Verbose -TraceSeverity Verbose

Revert back to the default logging levels

Revert the logging levels to the default, after executing the deployment or configuration changes.

Clear-SPLogLevel

PowerShell x64 vs x86: set execution policy when using Visual Studio post build events

Running PowerShell scripts in the Post build events within a Visual Studio project? Getting errors telling you “running scripts is disabled on this system”?

Visual Studio Output window showing PowerShell execution error

While working on Office 365 Developer Patterns and Practices (PnP) solution OfficeDevPnP.PowerShell Commands I had troubles with building my solution. Visual Studio uses PowerShell x86 in the background instead of my default PowerShell which uses the x64 version.

Check PowerShell version: x64 versus x86

By running the following you can check the current version. Download the PowerShell function from Check-PSVersion.ps1

function Check-PSVersion { if ([System.IntPtr]::Size -eq 4) { # When equal to 4, then x86 Write-Host "Running x86 PowerShell session" } else { # When equal to 8, then x64 Write-Host "Running x64 PowerShell session" } } Check-PSVersion

Where to find the PowerShell executable for both x64 and x86

The x64 version of PowerShell (Windows 8.1) can be found under:

"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe"

The x86 version of PowerShell (Windows 8.1) can be found under:

"C:\Windows\syswow64\WindowsPowerShell\v1.0\powershell.exe"

Change execution policy to use PowerShell in Visual Studio

Now we know we have two versions of PowerShell we can change the execution policy for the x86 version of PowerShell. Start the "C:\Windows\syswow64\WindowsPowerShell\v1.0\powershell.exe" with “Run as administrator”. Now change the execution policy accordantly.

Set-ExecutionPolicy Unrestricted