GithubHelp home page GithubHelp logo

excel-auth-sample's Introduction

Excel and ASP.NET Core Web API

This is an example project based on Microsoft.Identity.Web that demonstrates a Web API that

  1. can be used in the "From Web" PowerQuery option in Excel with Azure Active Directory authentication, and
  2. uses the provided credentials to call the Graph API.

Setup

This needs an app registration in Azure with

  • API permissions for the Graph calls that you want to do (with appropriate consent for your tenant)
  • A configured Application ID URI (under "Expose an API" in app registrations) that matches the Uri setting in the config
  • An authorized client application (same tab) of d3590ed6-52b3-4102-aeff-aad2292ab01c (Microsoft Office) with user_impersonation scope
  • A client ID, secret and tenant ID set up in the AzureAd configuration section

Usage

The sample can be used as follows:

  1. Ensure that the configured application uri resolves to localhost (e.g. by adding it in your hosts file)
  2. In Excel choose "Data" -> "From Web"
  3. Enter the chosen uri with an appropriate endpoint (in the sample, /Test/{siteName} should get info for a SharePoint site)
  4. You should be asked to log in using your AAD credentials

excel-auth-sample's People

Contributors

goomens avatar

Watchers

Robin Bakker avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.