ShareIt for Office 365 is published

imageMy previous post “Integrating SharePoint Online and Yammer – an app for that!” talked about an app we were building that would help you post a document that lives in SharePoint to Yammer.  The document stays in SharePoint but a link to the document is posted to Yammer where the conversation and discussion about it can continue i a highly collaborative setting.

ShareIt for Office 365 just hit the marketplace.  For free! If you use Office 365 and Yammer then this is a must have tool for your site.

It’s really simple to use.  Select a document and click Post to Yammer.

image

We have a raft of enhancements that we are hoping to make to the product over the next few months.

You can find out more about the app in the Office marketplace here:
http://office.microsoft.com/en-us/store/shareit-WA104088567.aspx

As always feel free to get in touch with me on twitter @LoungeFlyZ if you have any questions.

Thanks,

-CJ.

Using SharePoint VMs in Windows Azure with VPN access

At TechEd North America 2013 my good friend Paul Stubbs did a session with Michael Washam and Corey Sanders on:  IaaS: Hosting a Microsoft SharePoint 2013 Farm on Windows Azure

This was a really cool session that focused on building out SharePoint farms in Azure.  One of the things they talked about was a set of PowerShell scripts that they have built to fully automate this process.

The “SharePoint 2013 Automated Deployment Master Scripts” is a set of scripts that you can grab from GitHub that will automate end to end the process of creating, configuring and setting up SharePoint in Azure IaaS VMs.  They let you build out two farm types right now:

  • Single VMs – 3 VMs (DC, SQL and SharePoint)
  • Highly Available – 9 Vms (DC x2, SQL x2, 1 Quorum VM, SP App servers x2, SP WFE x2)

I watched the session in the online recordings after the TechEd and it interested me enough to try it out. 

So I did! and I have to say it totally rocks!

The PowerShell all runs on your client machine and uses the Azure PowerShell Cmdlets to remotely setup Azure etc… Getting your machine setup before you run the scripts is a little tricky as it uses CredSSP for delegation which requires some manual setup, but if you follow the Wiki word for word you should be fine (here).  My CredSSP setup failed because the Windows Remote Management service wasn’t running.

image

I wont get into all the steps for how to set up and run the scripts as that is well documented:

https://github.com/WindowsAzure/azure-sdk-tools-samples/wiki/Automated-Deployment-of-SharePoint-2013-with-Windows-Azure-PowerShell

After you run the scripts you end up with a fully configured SP Farm running in Azure.  Nice!  I opted for the SingleVMs option … so 3x VMs in total.

image

All those VMs sit on a Virtual Network that is also configured for you:

image

Once the whole script has run (warning can take a couple of hours) you can RDP into the VMs … or, just navigate to the default Sharepoint site that is configured. The script also outputs the admin credentials and the sites that were created:

Credentials: corp\spadmin Password: *********
Created Farm on http://sp-foo.cloudapp.net
Created Admin Site on http://sp-foo.clouadpp.net:20000

If you are looking for a quick and easy way to get started with building a SharePoint environment out on Azure then this is a great way to get started.

The next thing I wanted to do was to connect my personal machine into the same virtual network that the VMs run on.  Azure provides the ability to set up a point-to-site VPN that lets you do this.  Once you have configured this you will end up with a VPN connection from your machine into the network with your VMs in Azure.  This makes working with the whole setup a bunch easier and you can use your local machine for development and connect to the farm seamlessly.  You could even join your machine to the AD Domain that was automatically created for you if you wanted.

I did this & although its pretty complex it was pretty neat to finally get up and running.

A good starting point is this guide: Configure a Point-to-Site VPN in the Management Portal

HOWEVER!  One of the steps in that guide is creating a Gateway.  This is the VPN endpoint that your client PC connects to.  However, the steps in that guide assume you are creating a new  virtual network whereas in my case the virtual network was already created.  This means the settings referred to in the guide above are not available!  In particular i couldn’t modify the “Configure point-to-site connectivity” checkbox as it was disabled.  This took me quite some time to figure out.

First you need to Export your configuration using the Export button on the Virtual Network:

image

Then you need to modify the Export XML file and add the bits in bold below:

  <VirtualNetworkConfiguration>
    <Dns>
      <DnsServers>
        <DnsServer name=”DC1″ IPAddress=”10.20.2.4″ />
      </DnsServers>
    </Dns>
    <VirtualNetworkSites>
      <VirtualNetworkSite name=”SPAutoVNet” AffinityGroup=”SPAutoVNet-AG”>
        <AddressSpace>
          <AddressPrefix>10.20.0.0/16</AddressPrefix>
        </AddressSpace>
        <Subnets>
          <Subnet name=”AppSubnet”>
            <AddressPrefix>10.20.1.0/24</AddressPrefix>
          </Subnet>
          <Subnet name=”DCSubnet”>
            <AddressPrefix>10.20.2.0/24</AddressPrefix>
          </Subnet>
   <Subnet name=”GatewaySubnet”>
        <AddressPrefix>10.20.3.0/24</AddressPrefix>
    </Subnet>
        </Subnets>
        <DnsServersRef>
          <DnsServerRef name=”DC1″ />
        </DnsServersRef>
    <Gateway>
        <VPNClientAddressPool>
            <AddressPrefix>10.0.0.0/24</AddressPrefix>
        </VPNClientAddressPool>
    </Gateway>

      </VirtualNetworkSite>
    </VirtualNetworkSites>
  </VirtualNetworkConfiguration>
</NetworkConfiguration>

This adds a gateway subnet and an address pool for client PCs that connect via VPN.

Then you can reimport that configuration and your setup will be updated to include those settings.

image

Then you should see the point-to-site settings correctly setup like this:

image

You can then move on to creating the Gateway you need on that virtual network:

When you do that it can take a while to create the gateway … so be patient 🙂 it took about 10mins for me.

If that works correctly you will see your gateway setup properly along with its external IP etc…

image

Now comes the fun part … CERTIFICATES!  The VPN uses client certificates to authenticate and so you need to create and upload a root cert to Azure as part of this. These steps are detailed in the MSDN guide here: http://msdn.microsoft.com/en-us/library/windowsazure/dn133792.aspx#bkmk_VPNCertificates

It’s a bit fiddly, but in a nutshell you create a root certificate, upload it to Azure, create a client certificate off that root certificate & then load that on your client PC.  Below is my root cert uploaded to Azure:

image

Finally you get to the results of all your hard work.  You can download the VPN package which contains the configuration etc… from the Azure portal via a handy link:

image

Install it on your client PC … and once complete you should see a VPN connection available in the network area in Windows:

image

image

image

All going well you will be VPN’d into your Azure network and you should be able to ping the VMs! e.g. 10.20.1.5 is the main SP VM.

I went and created a new Web App in SharePoint on http://intranet, and the only other thing I did was add “intranet” to my hosts file on the client PC so it knew to hit 10.20.1.5 (the SP machine).

After that … boomtown! … my newly minted SharePoint site is available off my client PC via the VPN to Azure.

image

This is going to be very handy for playing around with various SharePoint farm setups in Azure with the flexibility of having them run in the cloud.  I don’t have a 32GB RAM laptop to do this “on prem” unfortunately. Azure VMs have only recently become affordable for me with the recent announcement that you don’t pay for them when they are switched off. 

Enjoy and thanks for reading.

Chris Johnson

SharePoint Intersections conference, MGM, Las Vegas, Oct 2013


Missing your yearly SharePoint fix in Vegas?  Look no further!

SharePoint Intersections is a new conference happening at the MGM Grand in Las Vegas, October 27 – 30.  They have a great set of sessions planned and its definitely worth taking a look at it.  ASP.Net, Visual Studio, Azure and SQL Intersections all happen at the same time in the same place … so its not just a bunch of SharePoint people to hang out with too 🙂

REGISTRATION DISCOUNT: Get a $50 discount!  Use the discount code “JOHNSON” during registration!

Bonus:  If you Register for the SHOW or COMPLETE package you get a Surface RT or XBOX or gift card!

I have the great privilege of running a one day pre-con workshop on SharePoint App development alongside Andrew Connell:

PRECON08: Getting Your Arms Around the SharePoint 2013 App Model (10/27 8:30am-4pm)

As well as the following sessions:

  • SP05: Working with SharePoint APIs Remotely

  • SP06: Apps for SharePoint Primer

  • SP04: Soup to Nuts how to Build a Metadata and Search Driven Intranet

For more information see: http://www.devintersection.com/sharepoint.aspx

I hope to see you there!

-CJ

Integrating SharePoint Online and Yammer – An app for that!

Way back at SPC12 (Nov 2012) the keynote included a demo that showed an example of the integration possible between SharePoint Online and Yammer that could be done with a little bit of development effort. I built that demo and decided to turn it into a real app anyone could use.

Some Background first: This surfaced in SharePoint Online by way of a new ribbon button that when pressed posted the selected document to Yammer via the Yammer Open Graph API.  It was shown pretty quickly and it was pretty easy to miss.  However, it demonstrated a few interesting methods of integration that are possible today using the new SharePoint App plumbing and Yammers pretty decent set of APIs.

The basic flow

1. In a document library a document was selected like this

clip_image002[4]

2. Then in the ribbon a new “Post to Yammer” button showed up

clip_image002

3. When it was clicked it posted to the Yammer activity feed. 

clip_image002[6]

The image above shows the hover over the activity. 

The activity feed shows a scrolling history of activity in the the Yammer network.  e.g. “Chris Johnson updated Product Catalog.docx”.  Its like that thing in Facebook that shows you all the music that your mates are listening to that they probably don’t know they are publishing to all their friends via spotify.  More on the Activity feed a little later on.

4. Clicking on the activity will take you a page in Yammer for that activity where you can Be Social™ and discuss the document, like it etc…

image

How it’s made

This app is pretty simple.  It’s a SharePoint Provider hosted application running in Azure Websites.  The SharePoint part of the app includes some xml to add the ribbon button to all document libraries.  When the user clicks the “Post to Yammer” button it sends some details about the document(s) to the backend of the app running in Azure. The backend code then uses the CSOM to call back into SharePoint to retrieve the name of the document and some other properties. Then the app directs the user through the Yammer OAuth authentication flow.  Once this is complete the app then is able to access Yammer on behalf of the user that signed in.

Finally the posting of the information includes posting to the Yammer activity stream using the OpenGraph APIs (JSON/REST based). It will also post to the main feed in Yammer too via the Messages REST API in Yammer. Both of these are easy to use and are fairly standard XML/JSON/REST based services.

image 

Why is this interesting?

Recently there has been a bunch of noise about SharePoint’s current dual headed social story. 

  • In the red corner you have the social features in SharePoint (both on-prem and SharePoint Online)
  • In the blue corner you have Yammer.

The problem is that right now there is much consternation about how they don’t work nicely together. Things seem to be happening too slowly for some people.  The products are currently not integrated all that well. That is slowly changing, like the ability to switch from the NewsFeed to Yammer in Office 365 that rolled out the day of writing this post.  Those improvements will continue over time and eventually I think we will see the ability to totally replace the current out of the box social features with Yammer.

<mini-rant>
How on earth people think Microsoft can magically mash together one product with another overnight and make it all work perfectly is beyond me. It will take time people! Just because you think you could have done in overnight doesn’t mean it works that way in huge software projects … better stop this rant now before i get carried away.
</mini-rant>

The short story is that right now you have to pick one or the other.  My vote is firmly in the Yammer category. But at the end of the day there are many factors that will go into your decision either way and there isn’t a perfect answer.

There is no doubt that Microsoft will integrate the two products more deeply.  This could come in a variety of flavors including:

  • surfacing stuff that happens in Yammer in SharePoint more seamlessly (short term strategy),
  • totally replacing the existing SharePoint social features with ones backed by the Yammer in the cloud (more likely and what I would put money on, maybe with the ability to use the old stuff if you can’t use a cloud service)

Back to why this integration is interesting…

You can do things today to help with this situation.  The demo showed a very basic example of some custom integration using things we know exist today.

I smell a set up!

… and you would be right.  We are going to release this app to the store so that anyone with Office 365 can use it.  It needed some tweaks to make it work well in production & some branding changes. However in the coming days/weeks we will release it under the name “ShareIt”.

image 

I am going to write a future post on how this app was created and it will include code to illustrate how to call the Yammer APIs.

Ultimately you should be able to follow along and learn about how you can leverage the SharePoint App model + Yammer APIs to help integrate the two products while we wait for MS to offer a nice compelling seamless integration at a yet to be determined point in time 🙂

Note: It is very likely that this app will no longer be needed once MS do their thing and integrate the products further.  I hope so to!

-CJ

TechEd North America session wrap up

image 

This morning at TechEd North America i did a session on Office and SharePoint 2013 App development.  In a nut shell it was 75mins of demos (8 or so).  It was a mix of things I have found handy developing Apps, things I think are going to play an important role in App development (SPA apps) and other things that I think are handy for those getting started with App development.

Here is a summary of the demos:

#1 SignalR:  Using SignalR in your apps backends for watching trace and debug information from your application. Great for when your code is running in Azure and you want visibility into what is going on.

#2 Token Caching: When you first are starting out with app development its not entirely obvious what all the tokens and parameters are that are passed to your app code. OR how to work with them.  This demo was all about showing a lightweight way to cache and store the tokens for use in subsequent pages.

#3 Use OAuth to access SharePoint from apps for Office:  This showed how to do “on the fly” OAuth from a task pane App in Excel.  This lets an application ask the user for permissions to SharePoint resources when needed. In the example i showed Excel, but you can do the same from a SharePoint app.

#4 / #5 The SharePoint cross-domain library: Two demos showing techniques for calling out to external services (in this case my blog) from JavaScript running in a SharePoint hosted app.  Also how to set up the CSOM for calling into the Host Web SharePoint site where you app is installed.  Both scenarios show cross domain techniques available.

#6 Bring Office documents into your SharePoint apps with the Office Web Applications:  Most people have seen the document preview windows you get in SharePoint search and document libraries that use the Office Web Applications. But you can also use these in your own Apps too.  Great way to show documents alongside your App content.

#7 SPA Apps:  Single Page Applications.  Very kindly Andrew Connell allowed me to show his recently built Learning Path Manager demo which showcases an App built using Durandal, Knockout, Bootstrap, FontAwesome, LinqJS and Toastr.  Finally SharePoint development has been possible using frameworks, tools and techniques that are moderns and current.  All the cool kids are doing this stuff and I think its going to be a very interesting option for SharePoint app development going forward. For source and more information please refer to AC’s blog post. 

#8 App CSS makes your app look like part of the experience: A simple demo showing how to use the Chrome Control and SP CSS in your provider hosted apps.  I skipped this in the session due to time.

#9 Elevate your SharePoint app’s permissions with app-only calls: No more running code in process as system!  The App model provides a fairly elegant way to elevate permissions without losing control of an apps privileges! Apps can make “app only” calls to SharePoint to do things that the App has rights to do, but not necessarily the user using the App.

#10 Yammer Integration – Bring your app to where users are by posting to the feed:  Yammer provides some nice APIs to work with.  For example REST APIs for posting the feed & OpenGraph APIs for posting activities.  I demoed an App called “ShareIt” that takes a document and posts it to Yammer. The app will hopefully be in the 365 marketplace shortly (free) and I hope to do a follow up “how it works” blog post on it + full source for the app.

Slides: (they are boring … just intros to the demos)

Demo files: The zip below contains the demo files for demos #1 – #6 and  #8 and #9.  SPA code comes from AC here and the ShareIt code (Yammer) will come out as part of my new blog on that App shortly.


The recording of the session will be up on Channel 9 in the next 24-48 hours i am told:
http://channel9.msdn.com/Events/TechEd/NorthAmerica/2013/SES-B401#fbid=vskrIEZiOtr

Happy App’ing!

-CJ

Handy Outlook Web Access 2013 tips

imageOutlook Web Access (OWA) 2013 has a nifty new view that really helps make it a lot more touch friendly.

Normally when you log into OWA 2013 you would see something like this:

image

If you are using this on a touch device you wouldn’t be the first to think that it’s not the greatest of experiences.  The folder nav etc… on the left is small and hard to tap with a finger etc..

image

OWA 2013 actually comes in three varieties:

  • Phone mode (MS calls this 1-Wide because its only one column of information)
  • Desktop/Laptop mode (3-wide)
  • Tablet mode (2-wide)

You can force OWA into these modes by altering the URL in the browser as follows:

Phone Mode /owa/?layout=tnarrow
Tablet Mode /owa/?layout=twide

Here is that same folder showing Tablet Mode:

imageimageimage

And now in Phone mode:

image

So to get this append the appropriate parameter on the end of your OWA URL … something like this:

https://pod51037.outlook.com/owa/?layout=twide

I personally like forcing my OWA to the twide mode on any touch enabled device. For example the new IE in Windows 8 seems to default to the normal OWA for me … but I like it in the touch friendly twide mode.

Offline mode
Final tip for the day is setting OWA to work offline.  This only works in new browsers like IE10.  It lets you access your email while not connected to a network.  This is handy if you don’t have Outlook on your machine and want to access things out of the office.

To set it up start by clicking the “cog” image and picking “Offine Settings”. You are then walked through a series of steps to setup the offline store.

image

Very handy if you have a Surface or an iPad and like using OWA for email instead of those devices terrible native email client apps (IMHO YMMV Smile).

Enjoy!

-CJ

Office Apps are sweet

Typically when I talk to people about Apps for Office their reaction is along the lines of “meh … yeah they are cool … but I don’t really see what the fuss is all about”.  I have to admit, I was kinda the same when I was introduced to them by Rolando on the Office team during a super early sneak preview of what the Office engineering team were doing for Office 2013.

Today our Office 365 tenant was upgraded to the new stuff … and along with that Exchange 2013.  That means finally I get to use Apps for Office in a real life, production system that I live and breath in everyday.  And they ROCK!

A bit of background (skip this if you already know what apps for office are all about)Apps for Office are the new way developers can extend Office applications (Word, Excel, Outlook and PowerPoint).  They are mini web applications that are embedded in the Office app.  They communicate over a provided JavaScript API to the “host” application.  For example an app for Outlook can read the recipients, subject, parts of the body of the message & attachment information when you use that app on a particular email message.  That app might do something like show you information about that person from LinkedIn or show you their Twitter profile etc…

You install these apps from the Office Store or you can also side load them if you build one just for a particular use and you don’t want to offer it to other people.

When you say “apps” most people think of apps for iPhones and so on, but what really peaks my interest in apps for Office are the private apps that can be built to assist companies offer new experiences for their workers.  For example you could build an app that integrates with your line of business system that tracks customers orders.  When a support email comes in the support person could instantly see the orders that were placed by that person.  The options are limitless.

If you are interested in developing an App for Office I recommend starting here:  Overview of apps for Office

Anyway … Provoke Solutions runs it’s email in Office 365 … so today we got upgraded and started to see some of this new functionality popping up in our apps … like Outlook.

image002By default you get the “Bing Maps” app in Outlook.  This little guy will detect addresses in an email and then map them on a map for you.  Pretty handy! 

However, even better are some of the others you can get from the Store

In particular I like the LinkedIn one that detects people on the email and shows you their LinkedIn profile. It also lets you connect with them.

app

Another out of the box app in Outlook is when it detects someone talking about setting up a time to meet.  It will offer to create a meeting invite for you!

image

There are loads of others for things like creating tasks for actions and so on.

image

What only really stuck me fully today about these is how useful they really will be.  In the past I was only ever looking at demos and most regular people would have tuned it out given they have little to no control over the version of Exchange their company runs. 

But today when they started showing up in Outlook for me (they work in Outlook Web Access too) it really dawned on me how useful they will be.

No doubt in a couple of days I will wonder how I ever survived without them 🙂

-CJ

Puget Sound SharePoint User Group presentation – Stop! Yammer Time.

Last night i was fortunate enough to present to the local Puget Sound SharePoint User group at the Microsoft offices in Bellevue.  I titled my presentation “Stop!  Yammer time”.

It was all about Yammer (no surprise there).  I ran through where I thought things were at with regards to the current overlap and confusion between the out of the box SharePoint social features vs. those in Yammer, some roadmap information about what to expect over the next year with regards to the integration of the two products and also a few bits for developers on what APIs are available.  I also demoed a sneak peak of an app for SharePoint Online that we are publishing shortly that lets people post information to Yammer from SharePoint (more on that soon in a future post).

I was also a little antagonistic (trying to get people questioning and thinking a bit more) with my analogy between SP vs. Yammer and the Matrix movies Red pill vs. Blue pill decision that Neo has to make.  Blue pill, stay blissfully ignorant that Yammer isn’t the future of all things social in SharePoint and other Microsoft products, or the Red pill, take the painful truth of reality now and get ready for the future albeit painful and a bit messy for the time being.

It was a fun session and i really enjoyed the opportunity to present.

My slides are below if you are interested in taking a look.  (they don’t really articulate a lot of what i spoke about outside of the slides, but hopefully it helps a little)

-CJ

I’m presenting on SharePoint and Apps at TechEd North America 2013…

TechEd likely needs no explaining to most folks who read my blog, but in short it’s Microsoft’s big technical conference that covers pretty much all MS technologies and products under one roof.  It’s a great event for taking in a lot of different topics vs. a more product specific event like SPC.

This year it is in New Orleans from June 3rd – June 6th and I will be there doing a session on SharePoint and App development tips and tricks.

SBS-B401 : Tips You Need to Know for Creating Apps for Microsoft Office and SharePoint 2013

In this session, we cover some tools and techniques for building out apps for Microsoft Office and SharePoint, including architecting for cross-domain scenarios, types of apps and much, much more. This is a must attend session for all app for Office and SharePoint developers.

Thursday June 6th at 10:15 am – Room TBD

So if you are are a SharePoint person attending it would be great to have you come along … or just get in touch at the event to chat!

-CJ