Posts

Calling Microsoft Graph API from an Angular 5 Single Page Application (SPA)

Image
In this post I will be discussing how to use OAuth 2 Implicit Grant to authenticate users with Azure AD and call Microsoft Graph ApI from an Angular 5 Single Page Application. The idea of consuming Microsoft Graph API in an Angular app was prompted by a discussion I had with a contact on LinkedIn recently, asking if I had worked with MS Graph API before, and since I had started learning Angular to broaden my skill set, I decided to create a simple SPA that will authenticate users via Azure AD and display users's profile information using MS Graph API. So if you are looking for how to do that, you are in the right place. I will be sharing my experience with you in this post and I hope you will find this it useful. I will break this post down into 3 categories: Creating an Angular 5 Application Authenticating and Authorizing your App Calling Microsoft Graph API Creating An Angular 5 Application Since this post is not about angular per se, I will not be going into nitt...

Customizing and Branding SharePoint Master Pages using JavaScript Embedding - Applies to On-prem and Office 365

Image
In this article, I will be sharing a few tips on the customization of SharePoint master page using JavaScript injection. As you might be aware, Microsoft discourages customization of the OOTB master page, and neither do they encourage the use of a custom master page especially for office 365, as doing so will prevent functional updates from being applied to the master page, unless they are manually applied. From maintenance point of view, I think applying updates manually will be cumbersome to maintain especially when you are supporting multiple clients. So I decided to do more research on the best way to have a greater level of control on the master page than just using the alternate css approach. A google search pointed me to the starter template  Core.EmbedJavaScriptJSOM developed by Wictor WilĂ©n. I downloaded it, and started playing around it.  The interesting thing is you can do a lot with JavaScript injection. You can move things around, change color, style the ...

Creating SharePoint Framework Client Web Part and solving the challenges with _RequestDigest Token value using React

Image
Recently I decided to add React and Angular to my portfolio for developing solutions for SharePoint. I'm starting with React and it has been an interesting journey so far. I started with React because Angular 2.x/4.x which is a major leap from Angular 1.x seems to have a few challenges integrating with SharePoint framework as Andrew Connell explains  here . Though these challenges are being addressed with the roll out of Angluar 5 as seen in another of Andrew Connell post:  Solve the SharePoint Framework + Angular Challenge with Angular 5.0 Elements . But as for me, I have decided to wait until Angular 5 is stable for SharePoint framework so that my learning can be seamless.  In this post I will be sharing what I have learnt in my few days of using React in SharePoint framework to build client web part. If you are considering learning React to work with SharePoint framework, these are some of the key concepts you will first need to understand to get started: State...