Coder Social home page Coder Social logo

sacitc / aspnet-donations-rest-sample Goto Github PK

View Code? Open in Web Editor NEW

This project forked from microsoftgraph/aspnet-donations-rest-sample

0.0 1.0 0.0 700 KB

This sample shows how to read and write into an Excel document stored in your OneDrive for Business account by using the Excel REST APIs.

License: Other

C# 59.32% CSS 1.73% ASP 0.20% HTML 8.03% JavaScript 30.72%

aspnet-donations-rest-sample's Introduction

Microsoft Graph Excel ASP.NET donations sample

This sample shows how to read and write into an Excel document stored in your OneDrive for Business account by using the Excel REST APIs.

Prerequisites

To use the Microsoft Graph Excel ASP.NET donations sample, you need the following:

  • Visual Studio 2015 installed and working on your development computer.

    Note: This sample is written using Visual Studio 2015. If you're using Visual Studio 2013, make sure to change the compiler language version to 5 in the Web.config file: compilerOptions="/langversion:5

  • A Microsoft Office 365 account. You can sign up for an Office 365 Developer subscription that includes the resources that you need to start building apps.

    Note: If you already have a subscription, the previous link sends you to a page with the message Sorry, you can’t add that to your current account. In that case, use an account from your current Office 365 subscription.

  • A Microsoft Azure Tenant to register your application. Azure Active Directory (AD) provides identity services that applications use for authentication and authorization. A trial subscription can be acquired here: Microsoft Azure.

    Important: You also need to make sure your Azure subscription is bound to your Office 365 tenant. To do this, see the Active Directory team's blog post, Creating and Managing Multiple Windows Azure Active Directories. The section Adding a new directory will explain how to do this. You can also see Set up your Office 365 development environment and the section Associate your Office 365 account with Azure AD to create and manage apps for more information.

  • The client ID and redirect URI values of an application registered in Azure. This sample application must be granted the Have full access to user files and files shared with user permission for Microsoft Graph. Add a web application in Azure and grant the proper permissions to it:

    • In the Azure Management Portal, select the Active Directory tab and an Office 365 tenant.
    • Select the Applications tab and choose the application that you want to configure.
    • In the permissions to other applications section, add the Microsoft Graph application.
    • For the Microsoft Graph application, add the following delegated permissions: Have full access to user files and files shared with user.
    • Save the changes.

    Note: During the app registration process, make sure to specify http://localhost:21942 as the Sign-on URL.

Configure the app

  1. Open Microsoft-Graph-ASPNET-Excel-Donations.sln file.
  2. In Solution Explorer, open the Web.config file.
  3. Replace ENTER_YOUR_CLIENT_ID with the client ID of your registered Azure application.
  4. Replace ENTER_YOUR_SECRET with the key of your registered Azure application.
  5. Upload the WoodGroveBankExpenseTrendsWorkbook.xlsx file included in this repo to the root OneDrive directory of your Office 365 tenant. The app won't work without this workbook, which stores the data in your donations list.

Run the app

  1. Press F5 to build and debug. Run the solution and sign in with your organizational account. The application launches on your local host and shows the starter page. WoodGrove Companion App start page

    Note: Copy and paste the start page URL address http://localhost:21942/home/index to a different browser if you get the following error during sign in:AADSTS70001: Application with identifier ad533dcf-ccad-469a-abed-acd1c8cc0d7d was not found in the directory.

  2. Select the Get Started button.

  3. The application displays the donations page. Select the `Add New' link to add a new task. Fill in the form with the donation details.

  4. After you add a donation, the app shows the updated donations list. If the newly added donation isn't updated, choose the Refresh link after a few moments. Donations list

Contributing

If you'd like to contribute to this sample, see CONTRIBUTING.MD.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Questions and comments

We'd love to get your feedback about the Microsoft Graph Excel REST API ASP.NET Donations sample. You can send your questions and suggestions to us in the Issues section of this repository.

Questions about Office 365 development in general should be posted to Stack Overflow. Make sure that your questions or comments are tagged with [MicrosoftGraph].

Additional resources

Copyright

Copyright (c) 2016 Microsoft. All rights reserved.

aspnet-donations-rest-sample's People

Contributors

andrewjmay avatar paulstubbs avatar ricalo avatar

Watchers

 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.