Friday, December 28, 2012

Authentication with Office 365 from an On-Premise Application

Recently I had a problem wherein I needed to connect to an Office 365 SharePoint site from an on Premise Windows App.
Now at first it seemed simple but as I drilled deeper I came across some challenges and while overcoming them I learned a lot more about how O365 Authentication works.

Before I go further I would like to point out 2 resources which helped me a lot in solving this challenge:
Here is that diagram which explains the AuthN basics for SharePoint Online in Office 365:
Passive claims AuthN 
(So the key here is to understand that SharePoint Online uses the binary token returned from the STS service located at login.microsoftonline.com to validate all requests.)

At first I tried using the “MsOnlineClaimsHelper” but I couldn’t get it to work as it kept on throwing errors while fetching the response using ‘WSTrustFeb2005ContractClient’. Then I looked at the WinRT code and it was doing the exact same thing but with much less dependencies. Just plain HttPWebRequests + XML.

But the WinRT code was specifically for REST API’s and not Client Object Model. So I modified the code a little bit to make it work with CSOM.

Here is the link to Helper class code that I created and used for one of the code samples on MSDN.



Programmer Anarchy

I came across this refreshing ‘Post Agile Process’ video which revitalizes my earlier email on Test is Dead.

Here are some key takeaways for me out of this talk:

  • No need for testing infrastructure.
    (This is a culture shift and a revolutionary way to solve a lot of problems existing in the software world)

  • Break software into smaller more independent pieces.

  • Experimentation drives Innovation. (Move fast break things)

  • 2 key qualities for surviving in the ‘Modern Developer’ role:
    • Self-Leaner
    • Likes to Deliver (“Perfect” is the enemy of “Good Enough”)

  • At times, think of Software development as Manufacturing rather than Engineering.
    (Being a geek, it was a bit mind boggling for me to hear this first but I get the point)

What are your thoughts ?



Test is Dead !!!!

A refreshing way to present a very important point :  Test is Dead


Some moments from the video :

clip_image001
clip_image002
clip_image003
clip_image004

clip_image005

clip_image006
clip_image007

clip_image008

clip_image009

clip_image010

clip_image011

.

.

Thursday, October 25, 2012

SharePoint 2013 RTM Bits available on MSDN

 

Yesterday I download the SharePoint 2013 RTM bits from MSDN and created a brand new VM with all the updated bits.
While configuring SharePoint in the Standalone mode I had the below issue:

configissue - Copy

This is a known issue since 2010 and is related to the Search Service. I was able to resolve this by sharing the correct folder under
C:\Program Files\Microsoft Office Servers\14.0\Data\Office Server\Applications and assigning the required permissions as described here.

Monday, July 16, 2012

SharePoint 2013 and Office 2013 . . . .

 

Finally, Microsoft has announced the latest release of SharePoint 2013 (a.k.a SharePoint 15) along with Office 2013 (a.k.a Office 15).

There are some significant changes in the new App Model and would require a lot of unlearning and learning to get in pace. Personally, I like the overall direction in which MS is heading. I am a JavaScript fan and have been heavily using libraries like KnockoutJS and jQuery for a more end-to-end experience in SharePoint. So for me it feels like home Smile.
I have been working on this new App Model since over a month now and below are some tips for all the SharePoint Dev’s out there:

  • Embrace & Learn JavaScript  (As a real language)
  • SharePoint is not hammer and Lists are not nails
  • Separate the Concerns (Logic, Presentation, Persistence)
  • Understand the Mechanics of how things are working  (Fundamentally, SharePoint is just an Abstraction on top of an ASP.net Web Application)
  • Good Architecture is possible even with SharePoint involved Smile

I will be sharing my experiences on this new journey as I move along…

Enjoy !!

Friday, May 04, 2012

Choices for JavaScript frameworks..

 

I have been using jQuery since a long time now and looking for other frameworks which can help me take our SharePoint product to the next level.

Below are some of the interesting links that I came across :

I am leaning towards knokoutjs and also looking at datajs for manipulating OData feeds on O365..

Wednesday, April 18, 2012

Implementing federated identity in SharePoint 2010


Recently, I started working on a scenario wherein we had to move an existing online portal to SharePoint 2010. The first interesting challenge was authentication. How do we support existing users as well allow users to use other identity providers like live, facebook, google, myopenid  to access the portal. So I started researching on that and below are my findings:
For implementing federated identity in SharePoint 2010, we need to use Claims Authentication and below are our 3 options:
· Windows Claims
· Forms based Claims
· SAML Claims
Since we want multiple identity providers like google, yahoo, facebook, myopenid etc., my recommendation would be to use SAML claims via a custom Claims Provider. Below are some examples on how to do this:
For Live Id we can generate SAML tokens directly using MSM but for other providers in general we have 2 options :
1. Setup Azure’s Access Control Service (aka. ACS) with multiple Identity Providers (google, yahoo, facebook, live id, etc.) and add ACS as Trusted Provider in SharePoint
clip_image001
Pros/Cons :
ACS is more scalable and it has built-in support for Live Id, Google, Facebook, Yahoo and WS-Federation.
We have to pay the Azure Access Control Service cost
2. Create custom Claims Provider, integrate it with all the identity providers using OAuth Server Side flow and add the custom provider as Trusted Provider in SharePoint.I also found this custom claims provider component, which meets the requirements
clip_image002
Pros/Cons :
Custom claims provider would require some hefty code for generating SAML tokens and managing multiple identity providers.
Since this would be our custom component we do not have to pay for any other services.
Hope this helps.

Friday, March 02, 2012

Visual Studio 11 (Beta) and .Net 4.5 (RTM)

 

Visual Studio 11 (Beta) and .Net 4.5 (RTM) are now available for everyone : http://www.microsoft.com/visualstudio/11/en-us/downloads

Below are some of new enhancements that I like :

· New Metro UI
clip_image002

· Portal Class Libraries
clip_image004

· Searchable Solution Explorer
clip_image006

· Page Inspector
clip_image008
clip_image010

· CSS Editor
clip_image012

· Full Intellisense and enhanced editor support for JavaScript
clip_image014
clip_image016
clip_image018

Friday, January 20, 2012

Experiences with Binary and DNA abstractions


Since over a year now, I have been working on an Innovation product on SharePoint 2010 (read more…) and I would like to share some my experiences, architecting and developing it. Below I have tried to group my experiences into technical and non-technical headings and also shared some of the interesting resources that I went through.
In the next few posts I would try to expand some of these headings and talk about them in more details…

AddIn