Philly .net Code Camp Follow-up

A quick post to list a couple of resources mentioned in the session today.

First, if you are starting Office development for Office 365, Office or SharePoint Add-ins you need to start with

Second, the code presented is up on my gituhub repository. This contains the final code I showed today.  You do need to update the web.config with the values for your tenant.

Finally, keep a look out for video of the presentation.  I will post a note here, so subscribe if you are interested.  The video will be a number of smaller videos focusing on some aspect of the presentation.  This will allow me to go into better depth for some of the more technical content.

There was a lot to cover in this session.  If you have any questions, please me t ne know.

Disable Automatically Extend Screen in PowerPoint

I’ve been to a few presentations where the speaker has run into this problem.  They are using PowerPoint with their device and a projector.  They start the SlideShow, which puts the display into ‘Extend’ mode.  They then need to switch out temporarily to another application during the presentation, but the device remains in Extended mode.  It does not automatically go back.  So on the presenters screen they see the application they wanted to discuss, while the audience is looking at an empty desktop.  Happened to me during a recent presentation too and I ended up just staying in PowerPoint application and ‘Duplicate’ mode.

Thanks to Dan Hartshorn, this is no longer an issue.  Open the File | Options and click the Advanced item in the left menu.  Scroll down to display and uncheck the ‘Automatically extend display when presenting on a laptop or tablet.’  Click OK to close the dialog and accept the settings.


SharePoint Saturday: Unified API Demo Follow-up

I spent a good deal of time in my presentation using the to demonstrate the REST calls and the data available from the Office 365 Unified APIs.  I was able to fit in one demo that showed the configuration to Azure AD Services and the adding of the Office 365 Unified API preview application.  You can get the application from GitHub here.  The demo went well, right up to the last click. 

The last click was supposed to show the the list of files for the authenticated user pulling the content from the both OneDrive for Business and SharePoint all from the same API call.  The user was authenticated, but in clicking the ‘Files’ menu item, I received the following error.

Response_type token is not supported

The fix was easy.  The configuration tab for the application includes a Manage Manifest button.  This button downloads/uploads the manifest associated with the application and includes a number of more advanced configuration properties.  Included in these properties is the "oauth2AllowImplicitFlow" property, which is false by default.  Download the manifest, change this value to true, and upload the manifest.  You need to sign out and then back in or the setting to take effect.  Once this is done, the file information does again flow back out of Office 365.

One last note, if you are using IE and running in localhost, there is an additional error.

User account identifier is not provided.

This one is specific to running in this configuration, on IE and on localhost.  Changing one of the these configurations will fix this issue.  So move it to the cloud or view it in Chrome.

SharePoint Saturday: Building Applications with Office 365 Unified API

In October 2014, the Office 365 team released a set of APIs to communicate with the Office 365 platform. The API was great for reading and writing content.  It also integrated nicely with the Azure AD Services and the Active Directory Access Libraries (ADAL).  The API exposed specific features, mainly Mail, Calendar, Contacts and Files.  In addition, these same APIs provided a connection into the SharePoint site on your tenant.  Communication was mainly through REST calls, but the url for these services was different.  Mail, Calendar and Contacts all pointed to the url and Files and SharePoint used the url of the tenant of the authenticated person.  Helping to sort all of the urls out was the Directory Service, which given the authenticated user and the specific resource in question, would return the appropriate base url.

At Build 2015, the Office Dev team announced a preview of the next version of this API called the Unified API.  The Unified API stems all API calls from a common url  The Unified API provides one token that is valid for all of the resources defined in the delegated permissions in the application configuration. 

I am giving a session on this topic at two SharePoint Saturday sessions in July, one on July 18 in Baltimore and the other on July 25 in NYC

The slides for the session are available on my OneDrive.  These started from the slides from the Build session, but edited for the content I wanted to present. 

Live Writer on Windows 10

I’ve mentioned my love of Live Writer before.  I had it running on previous Windows 10 builds including build 10130, but for me that build overall was pretty problematic.  Mainly the issues were sound and video related, but because of other minor issues and a heavy workload, I shelved using my Win10 until the build was updated from 10130.  This week, we received builds 10158, 10159 and 10162.  I’ve been pretty impressed with them so it is time to get Live Writer back on the machine.

On 10130 and previous builds, it was a matter of installing the .net Framework 3.5 and then the Live Writer app from the bootstrap installer.  On 10162, .net 3,5 can be installed from the Windows Features options.  As for the Live Writer app, the installer gave an error about OnCatalogResult.  I looked through some posts about this error and found this response is to download the full app and not the installer bootstrap.  The links in the article only have 2009 and 2011 as it was answered back in late 2010.  However, It was not to hard to determine based on the pattern what would be 2012 full version.  Downloaded it, installed it and using it to write this post.

Hopefully this type of work is only temporary as it sounds like this application may finally be available as an open source project

OneNote Screen Clipping and Internet Explorer Debugging

OneNote provides a great out of the box screen clipping feature.  Win+N and then S turns the screen opaque.  The mouse pointer becomes cross-hairs and selecting an area of the screen will capture the are to the clipboard.  There are other tools that can do a better job of this and provide more bells and whistles, but since OneNote is one of the first applications I install, it is available on every machine almost immediately.

I develop web applications, so I often have my browser’s Developer Tools open and running.  For javascript development, I mainly work in Chrome.  IE is coming along in this area, but at this point Chrome still is the tool for me.  In those instances where the bug only shows in IE, I can use the available developers tools to solve the issue.

I was working on one such IE specific issue recently.  I was having trouble with the function Date().toLocalDateString().  It returned a date string, which is what I wanted, but that string could not turned around to create a new date object.  It turns out this is a known bug in IE.  That’s great it is known, but I still need to fix it for IE. 

I wanted to capture a screenshot of the error.  I hit Win+N and then S.  Screen turned opaque and I selected the area I wanted.  What should happen next in my configuration is I get prompted with a dialog that asks what I want to do with the clipping.  Typically I send this to the Clipboard but it could go to a specific section of the notebook.  The dialog did not show.  I figured something got hung up in OneNote, so I closed out of it and the Screen Clipping tool.  Hit the quick keys, selected my screen and still no dialog.

Frustrated at this point I continued with my debugging and once I was past the final breakpoint, the OneNote dialog appeared.  I reloaded the page, hit a debug break point, took the screenshot and no dialog.  Again clearing the last breakpoint led to the dialog displaying.

I’m not sure what the relationship is at this point between the screen capture function and debugging in IE.  As you might expect, it is only an IE issue.  Debugging in Chrome and I would guess other browsers too did not produce the same issue.  This post is mainly to make you aware it exists so you don’t go crazy trying to find your clipping.  As for the date issue, I switched the function to use toDateString instead.

Connecting OneNote to WordPress

I’m a huge OneNote fan.  I’ve actively used the product since it was first released with Office 2003.  Even with the local storage of OneNote files, it was easy to pick things up and move to a new machine or rebuild when needed.  Take this to the current day and all of this content is stored in my OneDrive, so it follows me from device to device or from a machine rebuild and a login with my Microsoft Account.

I’ve also been a huge fan of LiveWriter.  It works with my site as well as SharePoint and other blogs.  There is a rich supply of add-ins created by a passionate community.  However, the last release is from 2012.  While it does continue to work well (I am using it to create and publish this post), people within Microsoft are trying to get this upgraded or at least moved to an open source project so the community can take over this product.  If you are interested, go to the link and retweet.

Note: if you are looking for LiveWriter, this blog post has the correct links.  Use this to get the latest version and not your favorite search engine.

So when the OneNote team announced that you ‘could connect OneNote to WordPress’, I was excited that this would provide an updated solution to posting content to WordPress.  I’ll be honest, I was truly disappointed in the solution. 

The solution is actually a plug-in for WordPress.  It contains files you deploy to your WordPress server and these files provide a toolbar icon in the WordPress post creation window.  This button looks at the OneNote instances stored in your OneDrive Personal only.  OneDrive for Business, SharePoint or local OneNote instance are not supported in this plug-in because of OneNote API limitations.  This may evolve in the future, but it is the current state.  Select the page that contains your blog post content and it appears in the WordPress textbox for you to continue editing.  It also looks like this solution is not available if your blog is hosted on 

While it is great that this plug-in exists, this is not how I write posts.  I avoid the WordPress editor except when absolutely necessary.  Is it a bad editor, probably not.  It just does not fit into my workflow.  I jot down lots of ideas for blog posts in OneNote in sections for both work and personal and even use it to initial outline the content.  What I was hoping for was a OneNote ribbon button or side panel, where I push this content directly into WordPress once it is completed, much like LiveWriter does.  Yes, there is a method of publishing content from OneNote into WordPress, but it needs Word as the intermediary that creates a Word document and pushes the content and keeps track of your blog settings.  This may be because OneNote is very flat from a formatting perspective, and it needs to be.  Word can provide some interesting format options required for some blog posts.  However, I don’t need a Word file in addition to the OneNote content.

OneNote has a rich set of APIs, as does WordPress.  I think it may be time to take a look and see what can be done to push instead of pull this content.


Get every new post delivered to your Inbox.

Join 383 other followers

%d bloggers like this: