Wednesday, April 29, 2015

Build 2015–Day 1 Keynote (takeaways)

 

Azure

  • Docker for Windows (docker client for windows)
    • Mix and Match linux and windows containers and run it on any server.
    • Debugging apps within containers in linux on windows server using Visual Studio.
    • .Net Core RC (for linux, windows and mac)
  • App Service
  • Visual Studio (download)
    • A free code editor for MAC, Linux and Windows
  • SQL DB Elastic Pool
    • For managing lots of databases in SaaS type scenarios
  • SQL Data Warehouse
    • Directly competes with AWS Redshift and its better.
  • Data Lake
    • Store and process infinite data.

Office

  • Office Apps
  • New Unified Graph API to access all the data from 1 place
  • ‘Delve’ App
  • ‘Sway’ App

Windows

  • Windows 10 Universal apps
  • Windows Store Apps now support  (this is freaking awesome !!!!!)
    • Web Sites/Web Apps
    • .Net and Win32 Apps (using app virtualization)
    • Android Java/ C++ Apps
    • Object C Apps
  • Compile Object C code using Visual Studio on Windows
  • Hololens
  • Microsoft Edge  (final name for ‘'Project Spartan’ the new Browser on Windows 10)

Saturday, April 11, 2015

New App type, CORS support and Office 365 API's with vanilla-js


Few months back Microsoft introduced several new API’s for Office 365 for which spun across SharePoint, Exchange, Lync, and rather than having the developers learn each of the platform they simplified the general concepts and also introduced a new type of app - “Office 365 external Apps

These apps look similar to “Provider Hosted Apps” but the have some key difference in the way you register them and launch them. For more details visit: http://www.sharepointnutsandbolts.com/2014/12/office-365-apps-and-sharepoint-apps-comparison.html

Along with this new type of Apps, Microsoft has also enabled cross-origin resource sharing (CORS) support for Office 365 API’s.
Which means we do not need any special client libraries to authenticate or access these API’s.

Let’s see how we can register this new type of app and then integrate it using vanilla-js.

Step 1 – Register your App

  • Sign in to Azure Management Portal
  • From Active Directory node select the Active Directory linked to your Office 365 subscription

    image
  • Click “Applications” tab from the top navigation

    image
  • Click “Add” from the bottom of the screen and select “Add an application my organization is developing”

    image
  • Provide the app name and select Web application and/or web API as Type

    image
  • Provide the Sign On URL of your web app in which you are integrating the API’s
  • Provide any unique ID of your App in App ID URI

    image

Step 2 – Configure permissions for App

  • Open the application and click “Configure” tab from the navigation

    image
  • Scroll down and click “Add Application” under “permissions to other applications

    image
  • Click “+” next to Office 365 SharePoint Online and save.

    image
  • For Office 365 SharePoint Online, open delegated permissions dropdown, select appropriate permissions
    and save the application

    image

Step 3 – Configure the App to allow OAuth implicit grant flow

  • On the configure tab, click on “Manage Manifest” button from the bottom and download the manifest

    image

    image
  • Set the value of "oauth2AllowImplicitFlow" to true and upload the manifest file.

    image

    image
  • The application registration is complete now…

Step 4 – Integrate it with a Web Page

  • Authenticate

    image

    image
  • Call the REST API with Authorization Token

    image

    image
  • Fetch document list from SharePoint

    image

    image

See complete code on github..

Other Resources:

.

.

.

AddIn