Following on from customer related issues in Office 365, there are a number of technology issues that give me concern. I will caveat this that this is based on my last project, and by the time I write this the Office 365 SharePoint platform could have changed to address some of these problems. Continue reading “Observations on Office 365 – Part 2”
Office 365
Observations on Office 365 – Part 1
We recently completed another Office 365 project, and I must confess, I’m still not sure about it. The project was reasonably successful – but there were a lot of tears shed, and we still have issues that are proving alarming difficult to deal with.
Broadly, I think, these issues can be broken down in to two categories – problems with the customer, and problems with the technology. Continue reading “Observations on Office 365 – Part 1”
Timed Jobs in Azure Provider-Hosted Apps
As I’ve described recently, I’m working on a Provider-Hosted SharePoint App that’s hosted in Azure. I’ve said previously about using Remote Event Receivers, and this whole app is really about sending emails from SharePoint Online (which we’re doing via SendGrid).
One of the things the customer wants is ‘timed’ emails – that is, some sort of service that talks to SharePoint Online, checks to see if there are any items in a list that are due for action, and if so sends an alert email. Simple enough, but with one minor problem. There are no timer jobs in SharePoint Apps. And you can’t put them into Office 365. And Azure doesn’t have an equivalent … yet. Continue reading “Timed Jobs in Azure Provider-Hosted Apps”
Register Remote Event Receivers on the HOST web
The project that I’m working on requires that I add remote event receivers to the host web for my Provider-hosted app. This is a little unusual – most of the stuff I found about remote event receivers was using the app web. It turns out, though, that it is possible, and there is a good explanation of how it works by Johnny Tordgeman on CodeProject. Rather than repeat all he’s said, I suggest you take a look. I just want to expand on some of the things I learnt doing this, that he didn’t mention. Continue reading “Register Remote Event Receivers on the HOST web”
App Deployment Error: "Your app handles the uninstalling app event"
When trying to do an F5-Deploy of a Provider hosted app from Visual Studio, I got this error during the deployment:
Error occurred in deployment step ‘Uninstall app for SharePoint’: Your app handles the uninstalling app event. Ensure that the Windows Azure Cloud Web Service project is deployed to the emulator prior to uninstalling the app.
This happened just after the step “Uninstall app for SharePoint” in the process. Continue reading “App Deployment Error: "Your app handles the uninstalling app event"”
Getting App Errors from Office 365 with PowerShell
When you’re developing apps sometimes you’ll have errors occur. How do you get any kind of log entry about that?
Well, it turns out help is at hand – there is a PowerShell command Get-SPOAppErrors. This gets you the app errors for a particular App ID. For example:
Connect-SPOService -Url https://example-admin.sharepoint.com
Get-SPOAppErrors -ProductId DEADBEEF-CAFE-BABE-FACE-BEADEDFACADE | Select-Object -first 5 | fl
This will get the first 5 entries for the app with the given GUID and output their details on the PowerShell command window.
Debug and Publish modes when deploying SharePoint Apps
Recently I’ve been working with a provider hosted SharePoint App. The objective of the app is to register a remote event receiver on a library in the host web, and then handle events from it. There’s a good article about this on CodeProject, and as usual, Chris O’Brien has been there and blogged about this too.
Anyway, working on my app I had a number of problems around deploying it, both for debug and ‘live’, in particular around the AppManifest.xml file. Continue reading “Debug and Publish modes when deploying SharePoint Apps”
Working with the Taxonomy in CSOM
Building on my previous post, once you’re connected to your SharePoint server, you might need to do a few things – like set up Term Groups and Sets in the Taxonomy service. You’ll need your application to reference the Microsoft.SharePoint.Client.Taxonomy assembly. Continue reading “Working with the Taxonomy in CSOM”
Connect to Office 365 with CSOM
If you’re going to connect to SharePoint Online 2013 in Office 365, you’ll need to reference a few assemblies in your solution:
- Microsoft.SharePoint.Client
- Microsoft.SharePoint.Client.Runtime
- System.Security
You’ll find these in the SharePoint Server 2013 Client Components SDK if you’ve not got them already.
In your code you’ll then need to create a ClientContext for your connection, including creating a SharePointOnlineCredentials object, and then you can start to talk to your SharePoint instance.
string url = "https://example.sharepoint.com/sites/testsite"; string username = "Office365User@example.com"; string userpass = "password"; using (ClientContext clientContext = new ClientContext(url)) { Console.WriteLine("Connecting to {0} as {1}", url, username); SecureString passWord = new SecureString(); foreach (char c in userpass.ToCharArray()) passWord.AppendChar(c); clientContext.Credentials = new SharePointOnlineCredentials(username, passWord); Web web = clientContext.Web; clientContext.Load(web); clientContext.ExecuteQuery(); Console.WriteLine("Got Web {0}", web.Url); }
And this will be the basis of my future examples of doing things in Office 365 SharePoint using CSOM.
Powershell in Office 365 … and why you need CSOM
Edit: It seems Chris O’Brien has been thinking about the same problem, and has a good post about it.
Microsoft claim that Office 365 has PowerShell support. I had assumed that this meant that most, or at least many, of the PowerShell commands I can use in a normal farm would also be available in Office 365.
I was wildly, spectacularly wrong. Continue reading “Powershell in Office 365 … and why you need CSOM”