Alexander Vanwynsberghe

"There is nothing impossible to him who will try"

The future of work with Office 365

Yesterday, April 1st 2014, I gave a keynote session at the Cronos Office 365 event in Belgium. I talked about the future of work with Office 365. Some exciting things like the Office Graph, Oslo, Clutter, the groups concept, OneDrive for business, …

As promised, you can find my slides at Slideshare:

How to setup DirSync with Project Online

Last week, the Active Directory team released a new version of a tool called “DirSync”. This is a tool who makes it possible to synchronize Active Directory accounts from your on-prem environment with Office 365. The version they release was a special one. Let me quote:

I’m happy to let you know that we’ve made it dead simple to connect AD to Azure AD, enabling users to log into Office 365, Windows Azure and any other cloud app integrated with Windows Azure AD using their on-premise username and password.  We’ve done this by updating Windows Azure Active Directory Sync Agent (a.k.a. DirSync) adding the ability to sync hashes of users’ on-premise AD passwords into Windows Azure AD.

How cool is that? Well, curious as I am, I decided to give this tool a go and synced my (playground) Active Directory to my Project Online tenant (which is nothing more than a Office 365 subscription). In this post, I’ll explain how you can achieve this.

First things first, you need an Active Directory. If you have an on-prem AD, just skip this step, at it’s just for demo purposes. As I don’t have the required hardware, but I do have an MSDN subscription, I used some Windows Azure VM’s for that part. What I did was first creating a DNS server (Networks -> Virtual Network -> Register a DNS Server). Next, a new virtual network using my DNS Server. Now  you can create your 2 Azure VM’s. I will not explain this in detail, but be sure that you use your Virtual Network when you go trough the Wizard.

03

You need 2 VM’s, one for the Active Directory role and one responsible for the DirSync. I’ll not go into detail about how to setup an AD role and how to join the other machine to this domain. You can find all info here: http://technet.microsoft.com/en-us/library/jj574166.aspx. Once completed, you should have this:

04

Next up, we will ‘enable’ DirSync at our Office 365 subscription. Browse to https://portal.microsoftonline.com/DirSync/DirectorySynchronization.aspx and enable step 3:

11

Next up, we will install the “DirSync” tool. You can download the latest version here (or use the “Download” link on the page you’re currently looking at). Once the file has been downloaded (180 MB), run the installer, and follow the wizard. The installation takes about 10 minutes.

05

Once the installation has been completed, the configuration Wizard will start. Provide your Windows Azure Active Directory Administrator (WAAD) Credentials. This is the account that you used to create your Office 365 subscription. (if you don’t know the credentials, or you want to try, browse to: https://activedirectory.windowsazure.com and test it)

07

At the next step of the wizard, enter your Active Directory Enterprise Administrator Credentials.

08

At the next step, be sure to enable “Enable Password Sync“. That’s this cool new feature!

09

Once the last step has been completed, a first “full sync” will be started:

10

That’s it! Nothing special. Now you have to check the “Users” in your Project Online (office 365) subscription. Browse to “Admin -> Office 365 -> Users“. There you will see the AD users! Great! Now, just “syncing” this users does not mean that they have access to your subscription. They are not assigned to a license. To manage this, click on the user, and select “Activate Synced Users

12

Assign the correct license to this user, and click “Next” to finish. Note that this user will get a temporary password, but you don’t need this as you have DirSync with password sync (joy!).

13

Still one small thing to do. “Share” my site (in this case the Project Web Access) with that new user. Just click on the “Share” button.

14

Now open a new (inprivate) browser window, and login using the username and password from your Active Directory. There you go:

15

There you have it! A sync between your AD and Project Online (Office 365). But it doesn’t stop there for this post. I just wanted to be sure that the password sync does actually work. So I changed the password and the first name of my user in my AD. But then … How can I force a sync? By default, it takes about 3 hours (password changes-only will be instantly, but changing a name for example will take some time).

So, PowerShell to the rescue! Browse  to “C:\Program Files\Windows Azure Active Directory Sync” and double-click on DirSyncConfigShell.psc1. Enter the command “Start-OnlineCoexistenceSync“:

16

If you open the “Event viewer” on your machine, you will see some entries from the AD sync:

17

Enjoy your syncing!

Using Project Online OData with Excel Web App

Project online has some great reporting features. One of the features that I really like is the OData service. This OData service is not only available for Project online, but also for on-premise deployments. To access this feed, all you have to do is browse to the following url: “/pwa/_api/ProjectData”.

One of the tools to “explore” this Odata feed is Excel. You can open one of the existing Project Online reports with Excel. Go to “Reports – English – Project Overview Dashboard” and click on the 3 dots, select “Edit“.

01

The report will open in Excel, and you can now select the ‘DATA‘ tab, and press ‘Refresh All‘. This should load all your data and show you a list of all projects with some additional information. This is pretty cool, but can we also use this within the Excel Web App? Well, let’s try it straight. Go back to the “Reports” folder, and instead of clicking on the 3 dots, just click on the name of the file. Excel Web App should open, and you will see an empty list of projects. Now click on the Data tab and select “Refresh All Connections“.

02

So, that’s not what we were expecting. It looks like Excel Web App cannot access the Odata feed. The explanation is quite simple:

When Excel workbooks are refreshed in Office 365, the BI Azure Service retrieves updated data from Project Online and recalculates the internal workbook model. If the workbook has data connections pointing to Project Online OData feeds, the BI Azure Service must have permission to the SharePoint Online tenant to retrieve that data.

What we have to do is giving the BI Azure service the required permissions to access our Project Online tenant. Browse to your PWA instance, and add “/_layouts/15/appinv.aspx” to the URL. For example “http://yourtenant.sharepoint.com/sites/pwa/_layouts/15/appinv.aspx“. You will now see the application permission screen. In the App ID field, add 00000009-0000-0000-c000-000000000000 and click Lookup. The title and App domain should tell you we’re working with the Azure AnalyisisServices. Copy and paste the following in the Permission Request XML Field

03

Click create and Trust the App.

04

To be sure that the App has been granted with the correct permissions, go to “Admin (on top) – SharePoint – Apps – Permissions“. There you should see the App “Microsoft.Azure.AnalysisServices

05

That’s it. Now we can open the report using Excel Web App, and click on “Data – Refresh All Connections“. Have fun!

06

Note: Be sure that you first refresh and save your report using the Excel (desktop) application. This will update the internal model of the workbook so it is supported by Excel Web App.

Debugging SharePoint 2013 remote events using the Windows Azure Service Bus

In this post, I will talk about how you can debug remote events within a SharePoint 2013 App. Especially with the Autohosted App Model (I made a post about that a while ago). Let me first start with a small and really easy to understand app that I will use to highlight the topic of this post.

The App

It’s quite an easy app where you can:

  • Add a contact
  • Get a contact

The App has some logic in the Web project (to manage the button “Add Contact” and “Get Contacts“), and a “List” in the SharePoint project. You will find the sources at the bottom of this post. When running this App, you will see something like:

03

As you can see, the “FullName” contains the text “Not set!“. That’s correct, I only provided my first and last name. But I want my full name to be “managed” by a remote service. And that’s where this post is all about. Finally! What I want is a remote event receiver that will be triggered when a new contact has been added. Add one to the SharePoint project. Right-Click and select “Add – New – Remote Event Receiver”. Call it “Contact List“. You need to select the type of event on which the event receiver needs to do something. Select “An item was added“.

02

You will now see a new folder in the Web Project called “Services“‘ and a new service called “ContactList.svc“. When you open it, you should see 2 methods. The one we need is called “ProcessOneWayEvent“. You can add the following code:

What it actually will do is get the ClientContext and get my first and last name that I submitted. It will than perform a string merge and add it to the “FullName” of the ListItem. Nothing fancy. So, why don’t we just hit F5 and check it out? You will soon find out that it will not work, the service is not being called. You can try to add a breakpoint, and you will see that it will be ignored. But why?

Problem

The problem is quite easy to understand. What will happen when you press F5 is a “Publish” of your App to SharePoint online, and once you “Trust” the App will eventually loop back to your “Local IIS”  (as you can see in the URL of the screenshot at the beginning of this post). It looks like:

problem1

So our Web project is running locally, meaning that our web service is also running locally. So in our case, when we hit the button “Add Contact“, it will try to call our Remote Event Receiver. So from a  SPAppWeb (which is SharePoint Online) context, it will not be able to contact “Localhost“. It looks like:

problem2

Solution: Windows Azure Service Bus

In the final “RTM” version of Office Developer Tools for Visual Studio 2012 there is cool feature called “Enable Remote Event Debugging“, making use of the Windows Azure Service Bus. Now first of all, what’s that Azure Service bus? Let me take the description from MSDN:

The Windows Azure Service Bus provides a hosted, secure, and widely available infrastructure for widespread communication, large-scale event distribution, naming, and service publishing. The Service Bus provides connectivity options for Windows Communication Foundation (WCF) and other service endpoints – including REST endpoints — that would otherwise be difficult or impossible to reach. Endpoints can be located behind network address translation (NAT) boundaries, or bound to frequently-changing, dynamically-assigned IP addresses, or both.

In other words, the Windows Azure Service Bus allows you to expose our local WCF service to the “outside world”. And that’s exactly what we need! All you have to do is get yourself a Service Bus instance and enable this feature in the SharePoint App project properties. You can get a Windows Azure Service Bus  instance using the Windows Azure Management Portal. On the left side, click on “Service Bus” and click on the “Add” sign on the bottom of the page. Add a name, and finish the wizard.

06When your service has been created, all you have to do is click on the “Access Key” button and copy the connection string. Next, right-click on your SharePoint App project in Visual Studio and select “SharePoint“. There you can “Enable Remote Event Debugging“:

08

Now you can add a breakpoint in your service code and press F5. There you go:

09And if you look at the App itself, you will see that the “FullName” has a value:

10

Mission accomplished! You can download the sources here. Have fun! Oh, and just a small note, did you know that you can actually see which services are available/active on you Windows Azure Service Bus? Just browse to the URL of your service bus, and you should see:

04

Integrate your Yammer feed into SharePoint Online

In this post, I will show you how easy it is to integrate your yammer feed into a SharePoint Online site. I’ll be making use of the “Yammer Web Part for SharePoint Online”. Note that this does not cover the way SharePoint and Yammer integrate when you’re using an on-prem installation with the “full blown” web parts like described here. Those web parts are only available for SharePoint 2007 and 2010. In fact, I’m still figuring out what the integration options will be for SharePoint online (and Office 365).

First of all, you need to download the web part from the Yammer site. Select “Yammer for SharePoint Online 1.0.x

01

Now we can upload this solution to your SharePoint Online instance. Browse to the URL of your site collection, like http://instance.sharepoint.com/sites/contoso. Click ‘Settings – Site Settings’. In the ‘Web Designer Galleries’, select ‘Solutions’.

02

You can now upload your solution. Select the button “Upload Solution

03

Browse to the web part you have just downloaded. After a successful upload, don’t forget to “Activate” the solution.

04

The next step is to integrate this web part on a page you want your feed to be visible. Just browse to a page and edit it. On the place you want, click “Add Web Part”. Select “Yammer” in the categories section. There you have the web part. Just click on “Add”.

05

The only thing you have to do now is configuring the web part. Click on the wrench in the top right corner and authorize with Yammer. Note: be sure that the page is still checked-out to you. Otherwise, you will get a nice “Oeps” error from SharePoint.

07

Now you can select the feed you want to show. This can either be the “My Feed”, “Company Feed”, “Group Feed”, “User Feed” or a “Topics Feed”. Select the feed you want, and there it is, your feed.

08

So it’s not a big deal to get your feed on SharePoint Online. But to be honest, I do not see any value of it. SharePoint Online (2013) itself already has some awesome social features. I’m really looking forward to some more in-depth integration of Yammer and SharePoint Online like the integration with SkyDrive Pro and Office Web Apps.

That’s it for today!

Get your populated Office 365 demo environment

Did you know that, as a Microsoft Partner, you can get a free demonstration environment and some guide materials for the new Office and Office 2013 without requiring a full installation locally? Well, I didn’t until James Akrigg (@jakrigg) posted the following tweet:

tweet

Curious as I am, I wanted my own demo environment. As I have a partner login associated with my Live ID, I decided to give it a go. Point your browser to https://www.microsoftofficedemos.com/ and click on the ‘Microsoft Partner’ link. You have to provide your credentials to continue. Once you’re successfully logged in, you will see some information about this offer, but the most import things are:

  • Subscription includes an Office 365 Enterprise SKU trial tenant (note: this tenant is subject to trial restrictions, including a 30-day expiration)
  • Subscription includes an Office Enterprise Hero Demo guide which provides talking script and clicking guidelines

That’s great, let’s create one. Click on the “Create Demo” link on top of the page. You will now see the options of the demo environment like the type of Office 365 Tenant, the demo content and the demo language. As for now, it looks like you cannot change the options. I guess that there will be some more options available in the future.

02Click on “Create Your Demo”. You can now enter a tenant name and type the correct robot number.

03Once you click on “Create My Account”, you will see the provision status of your tenant. Something like:

01

That’s all you have to do. If you read the questions from the FAQ section, you will see that the process will take 8 to 36 hours, depending on service availability. You will receive a completion email when the content provisioning process has been completed. You can easily check the status of your tenant by entering your tenant name in the ‘Domain’ box. (Or use the link in the email did receive after you registered your demo instance.

Having a demo environment is one thing, showing the new goodies are another thing. That’s where the demo guides and documents come in. You can find an impressive list of guidance documents by clicking on the “Resources” link on top of the page.

Small note: You can login using the following two credentials: KatieJ@tenant.onmicrosoft.com and RobinC@tenant.onmicrosoft.com

Thanks to the Office team for making this available!

Adding a custom domain to Office365 using WAAD

I’m playing with my Office 365 Plan E3 Technical Preview subscription for a quite a while now, and I think it’s just great! In this post, I want to guide you through the process of adding a custom domain to your subscription. The way I will show it is by using the Windows Azure Active Directory portal, which I will explain right away.

WAAD

Did you know that when subscribe to an Office 365 Plan, Microsoft automatically creates a new Windows Azure Active Directory (WAAD) that is associated with your Office 365 account? Well, at first, I didn’t! This is really great! For the people that do not know WAAD, let me quote:

Windows Azure Active Directory (Windows Azure AD) is a modern, REST-based service that provides identity management and access control capabilities for your cloud applications. Windows Azure Active Directory provides a cloud-based identity provider that easily integrates with your on-premises AD deployments and full support of third party identity providers.

When you login at https://activedirectory.windowsazure.com using your Office 365 administration credentials, you see that it’s linked to your subscription like:

01

Activate your custom domain

Alright, that being said, let’s move on and add a custom domain to our subscription. By default, your subscription domain will be something like yourname.onmicrosoft.com. That’s great, but using your personal domain is a much more professional way of working of course.  Let’s do that now.

First, click on the ‘domains’ link on the left side. You will see that the  *.onmicrosoft.com is already listed there by default. Click on the ‘Add a domain’ button.

02

In general, the process consists out of 2 mayor steps. First you need to ‘activate’ your domain, meaning that you need to prove that you actually own it. Secondly, you need to ‘manage your DNS settings’ to manage the correct usage of the Office 365 settings. The first wizard you see is the ‘activation’ part. Enter your domain and click ‘next

03

Now you need to verify that you are the owner of the domain. Out of the box, there are some pre-defined domain registrars listed. My domain is registered somewhere in the Netherlands, so no one of the listed option, so I selected ‘General Instructions

04

On the next screen, I used the TXT record option. On the DNS management page of my domain registrar, I added the TXT record like:

05

If you click ‘next’, the service will check the TXT record and you will be able you continue the process. In my case, it only took a few seconds for the TXT record to be applied. In other cases, it can take bit longer. The next step is to select the domain services. In other words, which services will be used with your domain? I selected ‘Exchange’ and ‘Lync’.

Don’t select SharePoint, because the DNS record that you create to enable SharePoint Online for this domain by default restricts all other DNS records from working. What you can do is create a CNAME record with the WWW prefix, and point it to yourname.sharepoint.com. Or even better, yourname-public.sharepoint.com, so it will link to the public website. You can then create another CNAME record with the PORTAL prefix, and point it to the SharePoint sites root.

06

That’s it, your domain is ready to be used, meaning that it’s added to your WAAD account (and thus can be used with your Office 365 subscription).

07

Configure your custom domain

Now that our domain is active, we can start using it. Click on the ‘Finish’ button (or if you already closed the previous wizard, just click on your Domain and click ‘DNS Settings’.) You will see a nice overview of the DNS entries you need to make on the DNS settings page of your domain registrar. For example:

09

On the wizard screen, you don’t have the option to ‘validate’ if you entered the correct DNS entries, but there’s an option to validate. Just go back to the screen where you see your domain name listed, click on the domain and select the ‘Troubleshoot domain’ button. It will ask you when you changed the DNS entries. For this quick check, just select ‘more than 72 hours ago’ so it will check it right away. In my case, this was a green result for Exchange (I didn’t configure Lync):

12

That’s it. Now we can use our custom domain with our Office 365 subscription. Let’s take Exchange for example. To be able to send an email to ‘abc@mycustomdomain.com’, you will need to add the email (alias) to the list of email addresses of the person ‘abc@something.onmicrosoft.com’. Go to the Exchange admin center – Recipients and edit the mailbox you want. On this new popup, select the ‘email address’ section, and add an SMTP alias like:

11

That should do the trick, you can now send an email to ‘abc@mycustomdomain.com’, and it should arrive in the mailbox of the user you just configured.

Have fun!