├── demo.xlsx ├── Microsoft Graph Excel REST ASPNET ├── Views │ ├── _ViewStart.cshtml │ ├── Home │ │ ├── About.cshtml │ │ └── Graph.cshtml │ ├── Shared │ │ ├── Error.cshtml │ │ ├── _LoginPartial.cshtml │ │ └── _Layout.cshtml │ └── Web.config ├── demo.xlsx ├── Global.asax ├── favicon.ico ├── Content │ ├── test.jpg │ ├── Site.css │ ├── bootstrap-theme.min.css │ └── bootstrap-theme.css ├── Scripts │ └── _references.js ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ └── glyphicons-halflings-regular.woff2 ├── App_Start │ ├── FilterConfig.cs │ ├── BundleConfig.cs │ ├── RouteConfig.cs │ └── Startup.Auth.cs ├── Helpers │ ├── IAuthProvider.cs │ └── SampleAuthProvider.cs ├── Models │ ├── GraphResources.cs │ └── GraphService.cs ├── Startup.cs ├── Controllers │ ├── ErrorController.cs │ ├── AccountController.cs │ └── HomeController.cs ├── Global.asax.cs ├── Web.Debug.config ├── Web.Release.config ├── Properties │ └── AssemblyInfo.cs ├── packages.config ├── TokenStorage │ └── SessionTokenCache.cs ├── Web.config ├── App_GlobalResources │ ├── Resource.Designer.cs │ └── Resource.resx └── Microsoft Graph Excel REST ASPNET.csproj ├── images ├── vs-project-url.jpg ├── add-application-id.jpg ├── add-implicit-grant.jpg ├── add-new-client-secret.jpg ├── add-register-an-app.jpg ├── add-copy-client-secret.jpg └── add-portal-app-registrations.jpg ├── Nuget.config ├── LICENSE ├── Microsoft Graph Excel REST ASPNET Sample.sln ├── README-localized ├── README-zh-cn.md ├── README-ja-jp.md ├── README-pt-br.md ├── README-ru-ru.md ├── README-es-es.md └── README-fr-fr.md ├── .gitignore ├── README.md └── CONTRIBUTING.md /demo.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoftgraph/aspnet-excelstarter-sample/master/demo.xlsx -------------------------------------------------------------------------------- /Microsoft Graph Excel REST ASPNET/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "~/Views/Shared/_Layout.cshtml"; 3 | } 4 | -------------------------------------------------------------------------------- /images/vs-project-url.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoftgraph/aspnet-excelstarter-sample/master/images/vs-project-url.jpg -------------------------------------------------------------------------------- /images/add-application-id.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoftgraph/aspnet-excelstarter-sample/master/images/add-application-id.jpg -------------------------------------------------------------------------------- /images/add-implicit-grant.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoftgraph/aspnet-excelstarter-sample/master/images/add-implicit-grant.jpg -------------------------------------------------------------------------------- /images/add-new-client-secret.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoftgraph/aspnet-excelstarter-sample/master/images/add-new-client-secret.jpg -------------------------------------------------------------------------------- /images/add-register-an-app.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoftgraph/aspnet-excelstarter-sample/master/images/add-register-an-app.jpg -------------------------------------------------------------------------------- /images/add-copy-client-secret.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoftgraph/aspnet-excelstarter-sample/master/images/add-copy-client-secret.jpg -------------------------------------------------------------------------------- /images/add-portal-app-registrations.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoftgraph/aspnet-excelstarter-sample/master/images/add-portal-app-registrations.jpg -------------------------------------------------------------------------------- /Microsoft Graph Excel REST ASPNET/demo.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoftgraph/aspnet-excelstarter-sample/master/Microsoft Graph Excel REST ASPNET/demo.xlsx -------------------------------------------------------------------------------- /Microsoft Graph Excel REST ASPNET/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Inherits="Microsoft_Graph_Excel_REST_ASPNET.MvcApplication" Language="C#" %> 2 | -------------------------------------------------------------------------------- /Microsoft Graph Excel REST ASPNET/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoftgraph/aspnet-excelstarter-sample/master/Microsoft Graph Excel REST ASPNET/favicon.ico -------------------------------------------------------------------------------- /Microsoft Graph Excel REST ASPNET/Content/test.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoftgraph/aspnet-excelstarter-sample/master/Microsoft Graph Excel REST ASPNET/Content/test.jpg -------------------------------------------------------------------------------- /Microsoft Graph Excel REST ASPNET/Scripts/_references.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoftgraph/aspnet-excelstarter-sample/master/Microsoft Graph Excel REST ASPNET/Scripts/_references.js -------------------------------------------------------------------------------- /Microsoft Graph Excel REST ASPNET/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoftgraph/aspnet-excelstarter-sample/master/Microsoft Graph Excel REST ASPNET/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /Microsoft Graph Excel REST ASPNET/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoftgraph/aspnet-excelstarter-sample/master/Microsoft Graph Excel REST ASPNET/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /Microsoft Graph Excel REST ASPNET/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoftgraph/aspnet-excelstarter-sample/master/Microsoft Graph Excel REST ASPNET/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /Microsoft Graph Excel REST ASPNET/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/microsoftgraph/aspnet-excelstarter-sample/master/Microsoft Graph Excel REST ASPNET/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /Microsoft Graph Excel REST ASPNET/Views/Home/About.cshtml: -------------------------------------------------------------------------------- 1 | 3 | 4 | @using Resources 5 | 6 | @{ 7 | ViewBag.Title = Resource.About; 8 | } 9 |

@ViewBag.Title

10 | 11 |

@Resource.About_Description

-------------------------------------------------------------------------------- /Microsoft Graph Excel REST ASPNET/App_Start/FilterConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Web; 2 | using System.Web.Mvc; 3 | 4 | namespace Microsoft_Graph_Excel_REST_ASPNET 5 | { 6 | public class FilterConfig 7 | { 8 | public static void RegisterGlobalFilters(GlobalFilterCollection filters) 9 | { 10 | filters.Add(new HandleErrorAttribute()); 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Microsoft Graph Excel REST ASPNET/Views/Shared/Error.cshtml: -------------------------------------------------------------------------------- 1 | 3 | 4 | @using Resources 5 | 6 | @{ 7 | ViewBag.Title = Resource.App_Name; 8 | } 9 | 10 |

@ViewBag.Title

11 |

@Resource.Error_Introduction

12 | 13 |
@ViewBag.Message
-------------------------------------------------------------------------------- /Microsoft Graph Excel REST ASPNET/Helpers/IAuthProvider.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. 3 | * See LICENSE in the source repository root for complete license information. 4 | */ 5 | 6 | using System.Threading.Tasks; 7 | 8 | namespace Microsoft_Graph_Excel_REST_ASPNET.Helpers 9 | { 10 | public interface IAuthProvider 11 | { 12 | Task GetUserAccessTokenAsync(); 13 | } 14 | } -------------------------------------------------------------------------------- /Microsoft Graph Excel REST ASPNET/Content/Site.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 50px; 3 | padding-bottom: 20px; 4 | } 5 | 6 | /* Set padding to keep content from hitting the edges */ 7 | .body-content { 8 | padding-left: 15px; 9 | padding-right: 15px; 10 | } 11 | 12 | /* Override the default bootstrap behavior where horizontal description lists 13 | will truncate terms that are too long to fit in the left column 14 | */ 15 | .dl-horizontal dt { 16 | white-space: normal; 17 | } 18 | -------------------------------------------------------------------------------- /Microsoft Graph Excel REST ASPNET/Models/GraphResources.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.IO; 5 | 6 | namespace Microsoft_Graph_Excel_REST_ASPNET.Models 7 | { 8 | public class UserInfo 9 | { 10 | public string Name { get; set; } 11 | public string Address { get; set; } 12 | 13 | } 14 | 15 | public class UserInfoRequest 16 | { 17 | public string index { get; set; } 18 | public string[][] values { get; set; } 19 | } 20 | } 21 | 22 | -------------------------------------------------------------------------------- /Microsoft Graph Excel REST ASPNET/App_Start/BundleConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Web; 2 | using System.Web.Optimization; 3 | 4 | namespace Microsoft_Graph_Excel_REST_ASPNET 5 | { 6 | public class BundleConfig 7 | { 8 | // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862 9 | public static void RegisterBundles(BundleCollection bundles) 10 | { 11 | bundles.Add(new StyleBundle("~/Content/css").Include( 12 | "~/Content/site.css")); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Nuget.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /Microsoft Graph Excel REST ASPNET/Startup.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. 3 | * See LICENSE in the source repository root for complete license information. 4 | */ 5 | 6 | using Owin; 7 | using Microsoft.Owin; 8 | 9 | [assembly: OwinStartup(typeof(Microsoft_Graph_Excel_REST_ASPNET.Startup))] 10 | 11 | namespace Microsoft_Graph_Excel_REST_ASPNET 12 | { 13 | public partial class Startup 14 | { 15 | public void Configuration(IAppBuilder app) 16 | { 17 | ConfigureAuth(app); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Microsoft Graph Excel REST ASPNET/Controllers/ErrorController.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. 3 | * See LICENSE in the source repository root for complete license information. 4 | */ 5 | 6 | using System.Web.Mvc; 7 | 8 | namespace Microsoft_Graph_Excel_REST_ASPNET.Controllers 9 | { 10 | public class ErrorController : Controller 11 | { 12 | // GET: Error 13 | public ActionResult Index(string message) 14 | { 15 | ViewBag.Message = message; 16 | return View("Error"); 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /Microsoft Graph Excel REST ASPNET/Global.asax.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | using System.Web.Optimization; 7 | using System.Web.Routing; 8 | 9 | namespace Microsoft_Graph_Excel_REST_ASPNET 10 | { 11 | public class MvcApplication : System.Web.HttpApplication 12 | { 13 | protected void Application_Start() 14 | { 15 | AreaRegistration.RegisterAllAreas(); 16 | FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); 17 | RouteConfig.RegisterRoutes(RouteTable.Routes); 18 | BundleConfig.RegisterBundles(BundleTable.Bundles); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Microsoft Graph Excel REST ASPNET/App_Start/RouteConfig.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | using System.Web.Mvc; 6 | using System.Web.Routing; 7 | 8 | namespace Microsoft_Graph_Excel_REST_ASPNET 9 | { 10 | public class RouteConfig 11 | { 12 | public static void RegisterRoutes(RouteCollection routes) 13 | { 14 | routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); 15 | 16 | routes.MapRoute( 17 | name: "Default", 18 | url: "{controller}/{action}/{id}", 19 | defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } 20 | ); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Microsoft Corporation. All rights reserved. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE 22 | -------------------------------------------------------------------------------- /Microsoft Graph Excel REST ASPNET Sample.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.26730.8 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft Graph Excel REST ASPNET", "Microsoft Graph Excel REST ASPNET\Microsoft Graph Excel REST ASPNET.csproj", "{374EF207-F626-4609-98B6-0BBBF939C59C}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {374EF207-F626-4609-98B6-0BBBF939C59C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {374EF207-F626-4609-98B6-0BBBF939C59C}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {374EF207-F626-4609-98B6-0BBBF939C59C}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {374EF207-F626-4609-98B6-0BBBF939C59C}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {02E3847E-491F-4B24-AC4F-2D0F6690A42F} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /Microsoft Graph Excel REST ASPNET/Web.Debug.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /Microsoft Graph Excel REST ASPNET/Web.Release.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /Microsoft Graph Excel REST ASPNET/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Microsoft_Graph_Excel_REST_ASPNET")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Microsoft_Graph_Excel_REST_ASPNET")] 13 | [assembly: AssemblyCopyright("Copyright © 2016")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("e0acf779-6715-46c4-a159-31a4cde3c9c1")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Revision and Build Numbers 33 | // by using the '*' as shown below: 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /Microsoft Graph Excel REST ASPNET/Views/Home/Graph.cshtml: -------------------------------------------------------------------------------- 1 | 3 | 4 | @using Resources 5 | 6 | @{ 7 | ViewBag.Title = Resource.App_Name; 8 | } 9 | 10 |

@ViewBag.Title

11 | 12 |

@Html.Raw(Resource.Graph_GetUserInfo_Instruction)

13 | @using (Html.BeginForm("GetMyUserInfo", "Home")) 14 | { 15 |
16 |
17 | 18 |
19 |
20 | } 21 |
22 | 23 |

@ViewBag.Name

@ViewBag.Email

24 | 25 |
26 | 27 | @using (Html.BeginForm("UploadInfoToExcel", "Home")) 28 | { 29 |
30 |
31 | 32 |
33 | 34 |
35 | 36 | 37 | 38 |
39 |
40 | } 41 |
42 |

@Html.Raw(ViewBag.Message)

43 |
44 | -------------------------------------------------------------------------------- /Microsoft Graph Excel REST ASPNET/Views/Shared/_LoginPartial.cshtml: -------------------------------------------------------------------------------- 1 | 3 | 4 | @using Resources 5 | 6 | @if (Request.IsAuthenticated) 7 | { 8 | 9 | 18 | 19 | } 20 | else 21 | { 22 | 40 | 41 | 48 | } 49 | 50 | -------------------------------------------------------------------------------- /Microsoft Graph Excel REST ASPNET/Views/Web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /Microsoft Graph Excel REST ASPNET/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Microsoft Graph Excel REST ASPNET/Controllers/AccountController.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. 3 | * See LICENSE in the source repository root for complete license information. 4 | */ 5 | 6 | using System.Web; 7 | using System.Web.Mvc; 8 | using Microsoft.Owin.Security; 9 | using Microsoft.Owin.Security.Cookies; 10 | using Microsoft.Owin.Security.OpenIdConnect; 11 | using Microsoft_Graph_Excel_REST_ASPNET.TokenStorage; 12 | using Microsoft_Graph_Excel_REST_ASPNET.Helpers; 13 | using System.Security.Claims; 14 | 15 | namespace Microsoft_Graph_Excel_REST_ASPNET.Controllers 16 | { 17 | public class AccountController : Controller 18 | { 19 | public void SignIn() 20 | { 21 | if (!Request.IsAuthenticated) 22 | { 23 | // Signal OWIN to send an authorization request to Azure. 24 | HttpContext.GetOwinContext().Authentication.Challenge( 25 | new AuthenticationProperties { RedirectUri = "/" }, 26 | OpenIdConnectAuthenticationDefaults.AuthenticationType); 27 | } 28 | } 29 | 30 | // Here we just clear the token cache, sign out the GraphServiceClient, and end the session with the web app. 31 | public void SignOut() 32 | { 33 | if (Request.IsAuthenticated) 34 | { 35 | // Get the user's token cache and clear it. 36 | string userObjectId = ClaimsPrincipal.Current.FindFirst(ClaimTypes.NameIdentifier).Value; 37 | 38 | SessionTokenCache tokenCache = new SessionTokenCache(userObjectId, HttpContext); 39 | HttpContext.GetOwinContext().Authentication.SignOut(OpenIdConnectAuthenticationDefaults.AuthenticationType, CookieAuthenticationDefaults.AuthenticationType); 40 | } 41 | 42 | 43 | // Send an OpenID Connect sign-out request. 44 | HttpContext.GetOwinContext().Authentication.SignOut( 45 | CookieAuthenticationDefaults.AuthenticationType); 46 | Response.Redirect("/"); 47 | } 48 | } 49 | } -------------------------------------------------------------------------------- /Microsoft Graph Excel REST ASPNET/Views/Shared/_Layout.cshtml: -------------------------------------------------------------------------------- 1 | 3 | 4 | @using Resources 5 | 6 | 7 | 8 | 9 | 10 | 11 | @ViewBag.Title 12 | @Styles.Render("~/Content/css") 13 | @Styles.Render("https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.6/css/bootstrap.min.css") 14 | @Styles.Render("https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.6/css/bootstrap-theme.min.css") 15 | @Scripts.Render("https://ajax.aspnetcdn.com/ajax/modernizr/modernizr-2.6.2.js") 16 | 17 | 18 | 37 |
38 | @RenderBody() 39 |
40 |
41 |

© @DateTime.Now.Year - @ViewBag.Title

42 |
43 |
44 | @Scripts.Render("https://ajax.aspnetcdn.com/ajax/jQuery/jquery-2.2.3.min.js") 45 | @Scripts.Render("https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.6/bootstrap.min.js") 46 | @RenderSection("scripts", required: false) 47 | 48 | -------------------------------------------------------------------------------- /Microsoft Graph Excel REST ASPNET/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. 3 | * See LICENSE in the source repository root for complete license information. 4 | */ 5 | 6 | using System.Threading.Tasks; 7 | using System.Web.Mvc; 8 | using Microsoft_Graph_Excel_REST_ASPNET.Helpers; 9 | using Microsoft_Graph_Excel_REST_ASPNET.Models; 10 | using Resources; 11 | using System; 12 | using System.IO; 13 | 14 | namespace Microsoft_Graph_Excel_REST_ASPNET.Controllers 15 | { 16 | public class HomeController : Controller 17 | { 18 | GraphService graphService = new GraphService(); 19 | 20 | public ActionResult Index() 21 | { 22 | return View("Graph"); 23 | } 24 | 25 | [Authorize] 26 | // Get the current user's email address from their profile. 27 | public async Task GetMyUserInfo() 28 | { 29 | try 30 | { 31 | 32 | // Get an access token. 33 | string accessToken = await SampleAuthProvider.Instance.GetUserAccessTokenAsync(); 34 | 35 | // Get the current user's email address. 36 | UserInfo myInfo = await graphService.GetMe(accessToken); 37 | ViewBag.Name = myInfo.Name; 38 | ViewBag.Email = myInfo.Address; 39 | return View("Graph"); 40 | } 41 | catch (Exception e) 42 | { 43 | if (e.Message == Resource.Error_AuthChallengeNeeded) return new EmptyResult(); 44 | return RedirectToAction("Index", "Error", new { message = Resource.Error_Message + Request.RawUrl + ": " + e.Message }); 45 | } 46 | } 47 | 48 | [Authorize] 49 | // Upload user information to Excel workbook "demo.xslx." 50 | public async Task UploadInfoToExcel() 51 | { 52 | 53 | try 54 | { 55 | 56 | // Get an access token. 57 | string accessToken = await SampleAuthProvider.Instance.GetUserAccessTokenAsync(); 58 | 59 | // Upload user info to Excel file "demo.xslx". 60 | ViewBag.Message = await graphService.AddInfoToExcel(accessToken, Request.Form["user-name"], Request.Form["user-email"]); 61 | 62 | ViewBag.Name = Request.Form["user-name"]; 63 | ViewBag.Email = Request.Form["user-email"]; 64 | return View("Graph"); 65 | } 66 | catch (Exception e) 67 | { 68 | if (e.Message == Resource.Error_AuthChallengeNeeded) return new EmptyResult(); 69 | return RedirectToAction("Index", "Error", new { message = Resource.Error_Message + Request.RawUrl + ": " + e.Message }); 70 | } 71 | } 72 | 73 | public ActionResult About() 74 | { 75 | return View(); 76 | } 77 | } 78 | } -------------------------------------------------------------------------------- /Microsoft Graph Excel REST ASPNET/Helpers/SampleAuthProvider.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. 3 | * See LICENSE in the source repository root for complete license information. 4 | */ 5 | 6 | using Microsoft.Identity.Client; 7 | using Microsoft.Owin.Security; 8 | using Microsoft.Owin.Security.OpenIdConnect; 9 | using Microsoft_Graph_Excel_REST_ASPNET.TokenStorage; 10 | using System.Collections.Generic; 11 | using System.Configuration; 12 | using System.Linq; 13 | using System.Security.Claims; 14 | using System.Threading.Tasks; 15 | using System.Web; 16 | using Resources; 17 | using System; 18 | 19 | namespace Microsoft_Graph_Excel_REST_ASPNET.Helpers 20 | { 21 | public sealed class SampleAuthProvider : IAuthProvider 22 | { 23 | 24 | // Properties used to get and manage an access token. 25 | private string redirectUri = ConfigurationManager.AppSettings["ida:RedirectUri"]; 26 | private string appId = ConfigurationManager.AppSettings["ida:AppId"]; 27 | private string appSecret = ConfigurationManager.AppSettings["ida:AppSecret"]; 28 | private string scopes = ConfigurationManager.AppSettings["ida:GraphScopes"]; 29 | private SessionTokenCache tokenCache { get; set; } 30 | 31 | private static readonly SampleAuthProvider instance = new SampleAuthProvider(); 32 | private SampleAuthProvider() { } 33 | 34 | public static SampleAuthProvider Instance 35 | { 36 | get 37 | { 38 | return instance; 39 | } 40 | } 41 | 42 | // Gets an access token. First tries to get the token from the token cache. 43 | public async Task GetUserAccessTokenAsync() 44 | { 45 | string signedInUserID = ClaimsPrincipal.Current.FindFirst(ClaimTypes.NameIdentifier).Value; 46 | HttpContextWrapper httpContext = new HttpContextWrapper(HttpContext.Current); 47 | TokenCache userTokenCache = new SessionTokenCache(signedInUserID, httpContext).GetMsalCacheInstance(); 48 | //var cachedItems = tokenCache.ReadItems(appId); // see what's in the cache 49 | 50 | ConfidentialClientApplication cca = new ConfidentialClientApplication( 51 | appId, 52 | redirectUri, 53 | new ClientCredential(appSecret), 54 | userTokenCache, 55 | null); 56 | 57 | try 58 | { 59 | IEnumerable accounts = await cca.GetAccountsAsync(); 60 | IAccount firstAccount = accounts.FirstOrDefault(); 61 | 62 | AuthenticationResult result = await cca.AcquireTokenSilentAsync(scopes.Split(new char[] { ' ' }), firstAccount); 63 | return result.AccessToken; 64 | } 65 | 66 | // Unable to retrieve the access token silently. 67 | catch (Exception) 68 | { 69 | HttpContext.Current.Request.GetOwinContext().Authentication.Challenge( 70 | new AuthenticationProperties() { RedirectUri = "/" }, 71 | OpenIdConnectAuthenticationDefaults.AuthenticationType); 72 | 73 | throw new Exception(Resource.Error_AuthChallengeNeeded); 74 | } 75 | } 76 | } 77 | } -------------------------------------------------------------------------------- /Microsoft Graph Excel REST ASPNET/TokenStorage/SessionTokenCache.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. 3 | * See LICENSE in the source repository root for complete license information. 4 | */ 5 | 6 | using Microsoft.Identity.Client; 7 | using System; 8 | using System.Collections.Generic; 9 | using System.Linq; 10 | using System.Threading; 11 | using System.Web; 12 | 13 | namespace Microsoft_Graph_Excel_REST_ASPNET.TokenStorage 14 | { 15 | 16 | // Store the user's token information. 17 | public class SessionTokenCache 18 | { 19 | private static ReaderWriterLockSlim SessionLock = new ReaderWriterLockSlim(LockRecursionPolicy.NoRecursion); 20 | string UserId = string.Empty; 21 | string CacheId = string.Empty; 22 | HttpContextBase httpContext = null; 23 | 24 | TokenCache cache = new TokenCache(); 25 | 26 | public SessionTokenCache(string userId, HttpContextBase httpcontext) 27 | { 28 | // not object, we want the SUB 29 | UserId = userId; 30 | CacheId = UserId + "_TokenCache"; 31 | httpContext = httpcontext; 32 | Load(); 33 | } 34 | 35 | public TokenCache GetMsalCacheInstance() 36 | { 37 | cache.SetBeforeAccess(BeforeAccessNotification); 38 | cache.SetAfterAccess(AfterAccessNotification); 39 | Load(); 40 | return cache; 41 | } 42 | 43 | public void SaveUserStateValue(string state) 44 | { 45 | SessionLock.EnterWriteLock(); 46 | httpContext.Session[CacheId + "_state"] = state; 47 | SessionLock.ExitWriteLock(); 48 | } 49 | public string ReadUserStateValue() 50 | { 51 | string state = string.Empty; 52 | SessionLock.EnterReadLock(); 53 | state = (string)httpContext.Session[CacheId + "_state"]; 54 | SessionLock.ExitReadLock(); 55 | return state; 56 | } 57 | public void Load() 58 | { 59 | SessionLock.EnterReadLock(); 60 | cache.Deserialize((byte[])httpContext.Session[CacheId]); 61 | SessionLock.ExitReadLock(); 62 | } 63 | 64 | public void Persist() 65 | { 66 | SessionLock.EnterWriteLock(); 67 | 68 | // Optimistically set HasStateChanged to false. We need to do it early to avoid losing changes made by a concurrent thread. 69 | cache.HasStateChanged = false; 70 | 71 | 72 | // Reflect changes in the persistent store 73 | httpContext.Session[CacheId] = cache.Serialize(); 74 | SessionLock.ExitWriteLock(); 75 | } 76 | 77 | // Triggered right before MSAL needs to access the cache. 78 | // Reload the cache from the persistent store in case it changed since the last access. 79 | void BeforeAccessNotification(TokenCacheNotificationArgs args) 80 | { 81 | Load(); 82 | } 83 | 84 | // Triggered right after MSAL accessed the cache. 85 | void AfterAccessNotification(TokenCacheNotificationArgs args) 86 | { 87 | // if the access operation resulted in a cache update 88 | if (cache.HasStateChanged) 89 | { 90 | Persist(); 91 | } 92 | } 93 | 94 | } 95 | } -------------------------------------------------------------------------------- /Microsoft Graph Excel REST ASPNET/Models/GraphService.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. 3 | * See LICENSE in the source repository root for complete license information. 4 | */ 5 | 6 | using Newtonsoft.Json; 7 | using Newtonsoft.Json.Linq; 8 | using System; 9 | using System.Collections.Generic; 10 | using System.Net; 11 | using System.Net.Http; 12 | using System.Net.Http.Headers; 13 | using System.Text; 14 | using System.Threading.Tasks; 15 | using Resources; 16 | using System.IO; 17 | 18 | namespace Microsoft_Graph_Excel_REST_ASPNET.Models 19 | { 20 | 21 | // This sample shows how to: 22 | // - Get information about the current user 23 | // - Upload the user information to an Excel workbook 24 | 25 | public class GraphService 26 | { 27 | 28 | public async Task AddInfoToExcel(string accessToken, string name, string address) 29 | { 30 | string endpoint = "https://graph.microsoft.com/v1.0/me/drive/root:/demo.xlsx:/workbook/tables/Table1/rows/add"; 31 | using (var client = new HttpClient()) 32 | { 33 | using (var request = new HttpRequestMessage(HttpMethod.Post, endpoint)) 34 | { 35 | string[] userInfo = { name, address }; 36 | string[][] userInfoArray = { userInfo }; 37 | UserInfoRequest userInfoRequest = new UserInfoRequest(); 38 | userInfoRequest.index = null; 39 | userInfoRequest.values = userInfoArray; 40 | 41 | string jsonBody = JsonConvert.SerializeObject(userInfoRequest); 42 | request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); 43 | request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", accessToken); 44 | request.Content = new StringContent(jsonBody, Encoding.UTF8, "application/json"); 45 | 46 | // This header has been added to identify our sample in the Microsoft Graph service. If extracting this code for your project please remove. 47 | request.Headers.Add("SampleID", "aspnet-excel-rest-sample"); 48 | 49 | using (var response = await client.SendAsync(request)) 50 | { 51 | if (response.IsSuccessStatusCode) 52 | { 53 | return Resource.Graph_UploadToExcel_Success_Result; 54 | } 55 | return response.ReasonPhrase; 56 | } 57 | } 58 | } 59 | } 60 | 61 | // Get the current user's email address from their profile. 62 | public async Task GetMe(string accessToken) 63 | { 64 | 65 | // Get the current user. 66 | // The app only needs the user's display name and email address, so select the mail and userPrincipalName properties. 67 | // If the mail property isn't defined, userPrincipalName should map to the email for all account types. 68 | string endpoint = "https://graph.microsoft.com/v1.0/me"; 69 | string queryParameter = "?$select=displayName,mail,userPrincipalName"; 70 | UserInfo me = new UserInfo(); 71 | 72 | using (var client = new HttpClient()) 73 | { 74 | using (var request = new HttpRequestMessage(HttpMethod.Get, endpoint + queryParameter)) 75 | { 76 | request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); 77 | request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", accessToken); 78 | 79 | // This header has been added to identify our sample in the Microsoft Graph service. If extracting this code for your project please remove. 80 | request.Headers.Add("SampleID", "aspnet-connect-rest-sample"); 81 | 82 | using (var response = await client.SendAsync(request)) 83 | { 84 | if (response.IsSuccessStatusCode) 85 | { 86 | var json = JObject.Parse(await response.Content.ReadAsStringAsync()); 87 | me.Address = !string.IsNullOrEmpty(json.GetValue("mail").ToString()) ? json.GetValue("mail").ToString() : json.GetValue("userPrincipalName").ToString(); 88 | me.Name = json.GetValue("displayName").ToString(); 89 | } 90 | return me; 91 | } 92 | } 93 | } 94 | } 95 | 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /Microsoft Graph Excel REST ASPNET/Web.config: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /Microsoft Graph Excel REST ASPNET/App_Start/Startup.Auth.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. 3 | * See LICENSE in the source repository root for complete license information. 4 | */ 5 | 6 | using System.Web; 7 | using Owin; 8 | using Microsoft.Owin.Security; 9 | using Microsoft.Owin.Security.Cookies; 10 | using Microsoft.Owin.Security.OpenIdConnect; 11 | using System.Configuration; 12 | using System.Threading.Tasks; 13 | using Microsoft_Graph_Excel_REST_ASPNET.TokenStorage; 14 | using System.IdentityModel.Tokens; 15 | using System.IdentityModel.Claims; 16 | using Microsoft.Identity.Client; 17 | 18 | namespace Microsoft_Graph_Excel_REST_ASPNET 19 | { 20 | public partial class Startup 21 | { 22 | 23 | // The appId is used by the application to uniquely identify itself to Azure AD. 24 | // The appSecret is the application's password. 25 | // The redirectUri is where users are redirected after sign in and consent. 26 | // The graphScopes are the Microsoft Graph permission scopes that are used by this sample: User.Read Mail.Send 27 | private static string appId = ConfigurationManager.AppSettings["ida:AppId"]; 28 | private static string appSecret = ConfigurationManager.AppSettings["ida:AppSecret"]; 29 | private static string redirectUri = ConfigurationManager.AppSettings["ida:RedirectUri"]; 30 | private static string graphScopes = ConfigurationManager.AppSettings["ida:GraphScopes"]; 31 | 32 | public void ConfigureAuth(IAppBuilder app) 33 | { 34 | app.SetDefaultSignInAsAuthenticationType(CookieAuthenticationDefaults.AuthenticationType); 35 | 36 | app.UseCookieAuthentication(new CookieAuthenticationOptions()); 37 | 38 | app.UseOpenIdConnectAuthentication( 39 | new OpenIdConnectAuthenticationOptions 40 | { 41 | 42 | // The `Authority` represents the Microsoft v2.0 authentication and authorization service. 43 | // The `Scope` describes the permissions that your app will need. See https://azure.microsoft.com/documentation/articles/active-directory-v2-scopes/ 44 | ClientId = appId, 45 | Authority = "https://login.microsoftonline.com/common/v2.0", 46 | PostLogoutRedirectUri = redirectUri, 47 | RedirectUri = redirectUri, 48 | Scope = "openid email profile offline_access " + graphScopes, 49 | TokenValidationParameters = new TokenValidationParameters 50 | { 51 | ValidateIssuer = false, 52 | // In a real application you would use IssuerValidator for additional checks, 53 | // like making sure the user's organization has signed up for your app. 54 | // IssuerValidator = (issuer, token, tvp) => 55 | // { 56 | // if (MyCustomTenantValidation(issuer)) 57 | // return issuer; 58 | // else 59 | // throw new SecurityTokenInvalidIssuerException("Invalid issuer"); 60 | // }, 61 | }, 62 | Notifications = new OpenIdConnectAuthenticationNotifications 63 | { 64 | AuthorizationCodeReceived = async (context) => 65 | { 66 | var code = context.Code; 67 | string signedInUserID = context.AuthenticationTicket.Identity.FindFirst(ClaimTypes.NameIdentifier).Value; 68 | 69 | TokenCache userTokenCache = new SessionTokenCache(signedInUserID, 70 | context.OwinContext.Environment["System.Web.HttpContextBase"] as HttpContextBase).GetMsalCacheInstance(); 71 | ConfidentialClientApplication cca = new ConfidentialClientApplication( 72 | appId, 73 | redirectUri, 74 | new ClientCredential(appSecret), 75 | userTokenCache, 76 | null); 77 | string[] scopes = graphScopes.Split(new char[] { ' ' }); 78 | 79 | AuthenticationResult result = await cca.AcquireTokenByAuthorizationCodeAsync(code, scopes); 80 | }, 81 | AuthenticationFailed = (context) => 82 | { 83 | context.HandleResponse(); 84 | context.Response.Redirect("/Error?message=" + context.Exception.Message); 85 | return Task.FromResult(0); 86 | } 87 | } 88 | }); 89 | } 90 | } 91 | } -------------------------------------------------------------------------------- /README-localized/README-zh-cn.md: -------------------------------------------------------------------------------- 1 | --- 2 | page_type: sample 3 | products: 4 | - office-excel 5 | - office-onedrive 6 | - ms-graph 7 | languages: 8 | - aspx 9 | - csharp 10 | description: "此示例演示如何使用 Microsoft Graph API 将 ASP.NET Web 应用连接到 Microsoft 工作或学校帐户 (Azure Active Directory)。" 11 | extensions: 12 | contentType: samples 13 | technologies: 14 | - Microsoft Graph 15 | services: 16 | - Excel 17 | - OneDrive 18 | - Users 19 | createdDate: 12/4/2017 10:26:12 AM 20 | --- 21 | # 针对 ASP.NET 4.6 的 Microsoft Graph Excel Starter 示例 22 | 23 | ## 目录 24 | 25 | * [先决条件](#prerequisites) 26 | * [注册应用程序](#register-the-application) 27 | * [生成并运行示例](#build-and-run-the-sample) 28 | * [问题和意见](#questions-and-comments) 29 | * [参与](#contributing) 30 | * [其他资源](#additional-resources) 31 | 32 | 此示例演示如何使用 Microsoft Graph API 将 ASP.NET 4.6 MVC Web 应用连接到 Microsoft 工作或学校帐户 (Azure Active Directory) 或个人帐户 (Microsoft),以检索用户的配置文件信息并将该信息上传到 Excel 工作簿。该应用使用 [Microsoft Graph .NET 客户端库](https://github.com/microsoftgraph/msgraph-sdk-dotnet)来处理 Microsoft Graph 返回的数据。 33 | 34 | 此外,此示例使用 [Microsoft 身份验证库 (MSAL)](https://www.nuget.org/packages/Microsoft.Identity.Client/) 进行身份验证。MSAL SDK 提供可使用 [Azure AD v2.0 终结点](https://azure.microsoft.com/en-us/documentation/articles/active-directory-appmodel-v2-overview)的功能,借助该终结点,开发人员可以编写单个代码流来处理对工作或学校帐户 (Azure Active Directory) 或个人帐户 (Microsoft) 的身份验证。 35 | 36 | ## 有关 MSAL 预览版的重要说明 37 | 38 | 此库适用于生产环境。我们为此库提供的生产级支持与为当前生产库提供的支持相同。在预览期间,我们可能会更改 API、内部缓存格式和此库的其他机制,必须接受这些更改以及 bug 修复或功能改进。这可能会影响应用。例如,缓存格式更改可能会对用户造成影响,如要求用户重新登录。API 更改可能会要求更新代码。在我们提供通用版后,必须在 6 个月内更新到通用版,因为使用预览版库编写的应用可能不再可用。 39 | 40 | ## 先决条件 41 | 42 | 此示例要求如下: 43 | 44 | * [Visual Studio](https://www.visualstudio.com/en-us/downloads) 45 | * [Microsoft 帐户](https://www.outlook.com)或 [Office 365 商业版帐户](https://msdn.microsoft.com/en-us/office/office365/howto/setup-development-environment#bk_Office365Account)。你可以注册 [Office 365 开发人员订阅](https://msdn.microsoft.com/en-us/office/office365/howto/setup-development-environment#bk_Office365Account),其中包含开始构建 Office 365 应用所需的资源。 46 | * 将此存储库根目录中的 **demo.xlsx** 文件上传到 OneDrive 帐户的根文件夹。此文件包含一个包含两列的空表格。 47 | 48 | ## 注册应用程序 49 | 50 | 1. 确定 ASP.NET 应用的 URL。在 Visual Studio 的“解决方案资源管理器”中,选择 **Microsoft Graph Excel REST ASPNET** 项目。在“**属性**”窗口中,查找“**URL**”值。复制此值。 51 | 52 | ![Visual Studio 属性窗口的屏幕截图](./images/vs-project-url.jpg) 53 | 54 | 1. 打开浏览器,并转到 [Azure Active Directory 管理中心](https://aad.portal.azure.com)。使用**个人帐户**(也称为:“Microsoft 帐户”)或**工作/学校帐户**登录。 55 | 56 | 1. 选择左侧导航栏中的“**Azure Active Directory**”,再选择“**管理**”下的“**应用注册(预览版)**”。 57 | 58 | ![“应用注册”的屏幕截图 ](./images/add-portal-app-registrations.jpg) 59 | 60 | 1. 选择**“新注册”**。在“**注册应用**”页面上,按如下方式设置值。 61 | 62 | - 将“**名称**”设置为 `ASPNET Excel Starter 示例`。 63 | - 将“**受支持的帐户类型**”设置为“**任何组织目录中的帐户和个人 Microsoft 帐户**”。 64 | - 在“**重定向 URI**”下,将第一个下拉列表设置为“`Web`”,并将值设置为在第 1 步中复制的 ASP.NET 应用 URL。 65 | 66 | ![“注册应用程序”页面的屏幕截图](./images/add-register-an-app.jpg) 67 | 68 | 1. 选择“**注册**”。在“**ASPNET Excel Starter 示例**”页面上,复制并保存“**应用程序(客户端) ID**”的值,以便在下一步中使用。 69 | 70 | ![新应用注册的应用程序 ID 的屏幕截图](./images/add-application-id.jpg) 71 | 72 | 1. 选择**管理**下的**身份验证**。找到**隐式授予**部分,并启用 **ID 令牌**。选择**保存**。 73 | 74 | ![“隐式授予”部分的屏幕截图](./images/add-implicit-grant.jpg) 75 | 76 | 1. 选择**管理**下的**证书和密码**。选择**新客户端密码**按钮。在**说明**中输入值,并选择一个**过期**选项,再选择**添加**。 77 | 78 | ![“添加客户端密码”对话框的屏幕截图](./images/add-new-client-secret.jpg) 79 | 80 | 1. 离开此页前,先复制客户端密码值。将在下一步中用到它。 81 | 82 | > [重要提示!] 83 | > 此客户端密码不会再次显示,所以请务必现在就复制它。 84 | 85 | ![新添加的客户端密码的屏幕截图](./images/add-copy-client-secret.jpg) 86 | 87 | ## 生成并运行示例 88 | 89 | 1. 下载或克隆针对 ASP.NET 4.6 的 Microsoft Graph Excel Starter 示例。 90 | 91 | 2. 在 Visual Studio 中打开示例解决方案。 92 | 93 | 3. 在根目录的 Web.config 文件中,使用你在应用注册过程中复制的应用程序 ID 和密码来替换 **ida:AppId** 和 **ida:AppSecret** 占位符值。 94 | 95 | 4. 按 F5 生成并运行此示例。这将还原 NuGet 包依赖项并打开该应用。 96 | 97 | >如果在安装包时出现任何错误,请确保你放置该解决方案的本地路径并未太长/太深。将解决方案移动到更接近驱动器根目录的位置可以解决此问题。 98 | 99 | 5. 使用个人帐户或者工作或学校帐户登录,并授予所请求的权限。 100 | 101 | 6. 选择“**获取电子邮件地址**”按钮。完成此操作后,页面上将显示登录用户的用户名和电子邮件地址。 102 | 103 | 7. 选择“**上传到 Excel**”按钮。应用程序将在 .xlsx 工作簿中创建一个新行,并将用户名和电子邮件地址添加到该行。按钮下方将显示一条成功消息。 104 | 105 | ## 问题和意见 106 | 107 | 我们乐意倾听你对此示例的反馈。你可以在该存储库中的[问题](https://github.com/microsoftgraph/aspnet-excelstarter-sample/issues)部分将问题和建议发送给我们。 108 | 109 | 我们非常重视你的反馈意见。请在[堆栈溢出](http://stackoverflow.com/questions/tagged/microsoftgraph)上与我们联系。使用 [MicrosoftGraph] 标记出你的问题。 110 | 111 | ## 参与 ## 112 | 113 | 如果想要参与本示例,请参阅 [CONTRIBUTING.md](CONTRIBUTING.md)。 114 | 115 | 此项目已采用 [Microsoft 开放源代码行为准则](https://opensource.microsoft.com/codeofconduct/)。有关详细信息,请参阅[行为准则常见问题解答](https://opensource.microsoft.com/codeofconduct/faq/)。如有其他任何问题或意见,也可联系 [opencode@microsoft.com](mailto:opencode@microsoft.com)。 116 | 117 | ## 其他资源 118 | 119 | - [其他 Microsoft Graph Connect 示例](https://github.com/MicrosoftGraph?utf8=%E2%9C%93&query=-Connect) 120 | - [Microsoft Graph 概述](http://graph.microsoft.io) 121 | - [Office 开发人员代码示例](http://dev.office.com/code-samples) 122 | - [Office 开发人员中心](http://dev.office.com/) 123 | 124 | ## 版权信息 125 | 版权所有 (c) 2019 Microsoft。保留所有权利。 126 | 127 | 128 | -------------------------------------------------------------------------------- /README-localized/README-ja-jp.md: -------------------------------------------------------------------------------- 1 | --- 2 | page_type: sample 3 | products: 4 | - office-excel 5 | - office-onedrive 6 | - ms-graph 7 | languages: 8 | - aspx 9 | - csharp 10 | description: "このサンプルでは、Microsoft Graph API を使用して ASP.NET Web アプリを職場または学校の Microsoft アカウントに接続する方法示します。" 11 | extensions: 12 | contentType: samples 13 | technologies: 14 | - Microsoft Graph 15 | services: 16 | - Excel 17 | - OneDrive 18 | - Users 19 | createdDate: 12/4/2017 10:26:12 AM 20 | --- 21 | # ASP.NET 4.6 用 Microsoft Graph Excel Starter のサンプル 22 | 23 | ## 目次 24 | 25 | * [前提条件](#prerequisites) 26 | * [アプリケーションの登録](#register-the-application) 27 | * [サンプルのビルドと実行](#build-and-run-the-sample) 28 | * [質問とコメント](#questions-and-comments) 29 | * [投稿](#contributing) 30 | * [その他のリソース](#additional-resources) 31 | 32 | このサンプルでは、Microsoft Graph API を使用して ASP.NET 4.6 MVC Web アプリを職場または学校の (Azure Active Directory) Microsoft アカウントまたは個人用 (Microsoft) アカウントに接続し、ユーザーのプロファイル情報を取得してその情報を Excel ブックにアップロードする方法を示します。このサンプルでは、Microsoft Graph が返すデータを操作するために、[Microsoft Graph .NET クライアント ライブラリ](https://github.com/microsoftgraph/msgraph-sdk-dotnet)が使用されます。 33 | 34 | また、認証には、[Microsoft 認証ライブラリ (MSAL)](https://www.nuget.org/packages/Microsoft.Identity.Client/) が使用されます。MSAL SDK では [Azure AD v2 0 エンドポイント](https://azure.microsoft.com/en-us/documentation/articles/active-directory-appmodel-v2-overview)を操作するための機能が提供されており、開発者は職場または学校 (Azure Active Directory) アカウントおよび個人用 (Microsoft) アカウントの両方に対する認証を処理する単一のコード フローを記述することができます。 35 | 36 | ## MSAL プレビューに関する重要な注意事項 37 | 38 | このライブラリは、運用環境での使用に適しています。このライブラリに対しては、現在の運用ライブラリと同じ運用レベルのサポートを提供します。プレビュー中にこのライブラリの API、内部キャッシュの形式、および他のメカニズムを変更する場合があります。これは、バグの修正や機能強化の際に実行する必要があります。これは、アプリケーションに影響を与える場合があります。例えば、キャッシュ形式を変更すると、再度サインインが要求されるなどの影響をユーザーに与えます。API を変更すると、コードの更新が要求される場合があります。一般提供リリースが実施されると、プレビュー バージョンを使って作成されたアプリケーションは動作しなくなるため、6 か月以内に一般提供バージョンに更新することが求められます。 39 | 40 | ## 前提条件 41 | 42 | このサンプルを実行するには次のものが必要です。 43 | 44 | * [Visual Studio](https://www.visualstudio.com/en-us/downloads) 45 | * [Microsoft アカウント](https://www.outlook.com)または [Office 365 for Business アカウント](https://msdn.microsoft.com/en-us/office/office365/howto/setup-development-environment#bk_Office365Account)のいずれか。Office 365 アプリのビルドを開始するために必要なリソースを含む [Office 365 Developer サブスクリプション](https://msdn.microsoft.com/en-us/office/office365/howto/setup-development-environment#bk_Office365Account)にサインアップできます。 46 | * このレポジトリのルートにあるファイル **demo.xlsx** を、OneDrive アカウントのルート フォルダーにアップロードします。このファイルには空のテーブルが含まれており、テーブルには列が 2 つあります。 47 | 48 | ## アプリケーションを登録する 49 | 50 | 1. ASP.NET アプリの URL を特定します。Visual Studio のソリューション エクスプ ローラーで、[**Microsoft Graph Excel REST ASPNET**] プロジェクトを選択します。[**プロパティ**] ウィンドウで、**URL** の値を見つけます。この値をコピーします。 51 | 52 | ![Visual Studio の [プロパティ] ウィンドウのスクリーンショット](./images/vs-project-url.jpg) 53 | 54 | 1. ブラウザーを開き、[Azure Active Directory 管理センター](https://aad.portal.azure.com)へ移動します。**個人用アカウント** (別名:Microsoft アカウントか**職場または学校のアカウント**を使用してログインします。 55 | 56 | 1. 左側のナビゲーションで [**Azure Active Directory**] を選択し、次に [**管理**] で [**アプリの登録 (プレビュー)**] を選択します。 57 | 58 | ![アプリの登録のスクリーンショット ](./images/add-portal-app-registrations.jpg) 59 | 60 | 1. **[新規登録]** を選択します。[**アプリケーションの登録**] ページで、次のように値を設定します。 61 | 62 | - [**名称**] を、"`ASPNET Excel Starter Sample`" にします。 63 | - [**サポートされているアカウントの種類**] を [**任意の組織のディレクトリ内のアカウントと個人用の Microsoft アカウント**] に設定します。 64 | - [**リダイレクト URI**] で、1 つ目のドロップダウン リストを [`Web`] に設定し、手順 1 でコピーした ASP.NET アプリの URL に値を設定します。 65 | 66 | ![[アプリケーションの登録] 67 | > ページのスクリーンショット](./images/add-register-an-app.jpg) 68 | 69 | 1. [**登録**] を選択します。[**ASPNET Excel Starter Sample**] ページで、[**アプリケーション (クライアント) ID**] の値をコピーして保存します。この値は次の手順で必要です。 70 | 71 | ![新しいアプリ登録のアプリケーション ID のスクリーンショット](./images/add-application-id.jpg) 72 | 73 | 1. [**管理**] で [**認証**] を選択します。[**暗黙的な許可**] セクションを見つけ、[**ID トークン**] を有効にします。[**保存**] を選択します。 74 | 75 | ![[暗黙的な許可] セクションのスクリーンショット](./images/add-implicit-grant.jpg) 76 | 77 | 1. [**管理**] で [**証明書とシークレット**] を選択します。[**新しいクライアント シークレット**] ボタンを選択します。[**説明**] に値を入力し、[**有効期限**] のオプションのいずれかを選び、[**追加**] を選択します。 78 | 79 | ![[クライアントシークレットの追加] ダイアログのスクリーンショット](./images/add-new-client-secret.jpg) 80 | 81 | 1. このページを離れる前に、クライアント シークレットの値をコピーします。この値は次の手順で必要になります。 82 | 83 | > [重要!] このクライアント シークレットは今後表示されないため、この段階で必ずコピーするようにしてください。 84 | 85 | ![新規追加されたクライアント シークレットのスクリーンショット](./images/add-copy-client-secret.jpg) 86 | 87 | ## サンプルのビルドと実行 88 | 89 | 1. ASP.NET 4.6 用 Microsoft Graph Excel Starter Sample をダウンロードするか複製します。 90 | 91 | 2. Visual Studio でサンプル ソリューションを開きます。 92 | 93 | 3. ルート ディレクトリの Web.config ファイルで、**ida:AppId** と **ida:AppSecret** のプレースホルダ―の値をアプリの登録時にコピーしたアプリケーションの ID とパスワードと置き換えます。 94 | 95 | 4. F5 キーを押して、サンプルをビルドして実行します。これにより、NuGet パッケージの依存関係が復元され、アプリが開きます。 96 | 97 | >パッケージのインストール中にエラーが発生した場合は、ソリューションを保存したローカル パスが長すぎたり深すぎたりしていないかご確認ください。ドライブのルート近くにソリューションを移動すると問題が解決します。 98 | 99 | 5. 個人用アカウントか職場または学校のアカウントでサインインし、要求されたアクセス許可を付与します。 100 | 101 | 6. [**Get email address**] (メール アドレスを取得) ボタンを選択します。操作が完了すると、サインインしているユーザーの名前とメール アドレスがページに表示されます。 102 | 103 | 7. [**Upload to Excel**] (Excel にアップロードする) ボタンを選択します。アプリケーションにより demo.xlsx ブックに新しい行が作成され、ユーザーの名前とメール アドレスがその行に追加されます。ボタンの下に、成功メッセージが表示されます。 104 | 105 | ## 質問とコメント 106 | 107 | このサンプルに関するフィードバックをお寄せください。質問や提案につきましては、このリポジトリの「[問題](https://github.com/microsoftgraph/aspnet-excelstarter-sample/issues)」セクションで送信できます。 108 | 109 | お客様からのフィードバックを重視しています。[スタック オーバーフロー](http://stackoverflow.com/questions/tagged/microsoftgraph)でご連絡ください。ご質問には [MicrosoftGraph] のタグを付けてください。 110 | 111 | ## 投稿 ## 112 | 113 | このサンプルに投稿する場合は、[CONTRIBUTING.md](CONTRIBUTING.md) を参照してください。 114 | 115 | このプロジェクトでは、[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/) が採用されています。詳細については、「[Code of Conduct の FAQ](https://opensource.microsoft.com/codeofconduct/faq/)」を参照してください。また、その他の質問やコメントがあれば、[opencode@microsoft.com](mailto:opencode@microsoft.com) までお問い合わせください。 116 | 117 | ## その他のリソース 118 | 119 | - [その他の Microsoft Graph Connect サンプル](https://github.com/MicrosoftGraph?utf8=%E2%9C%93&query=-Connect) 120 | - [Microsoft Graph の概要](http://graph.microsoft.io) 121 | - [Office 開発者向けコード サンプル](http://dev.office.com/code-samples) 122 | - [Office デベロッパー センター](http://dev.office.com/) 123 | 124 | ## 著作権 125 | Copyright (c) 2019 Microsoft.All rights reserved. 126 | 127 | 128 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.suo 8 | *.user 9 | *.userosscache 10 | *.sln.docstates 11 | 12 | # User-specific files (MonoDevelop/Xamarin Studio) 13 | *.userprefs 14 | 15 | # Build results 16 | [Dd]ebug/ 17 | [Dd]ebugPublic/ 18 | [Rr]elease/ 19 | [Rr]eleases/ 20 | x64/ 21 | x86/ 22 | bld/ 23 | [Bb]in/ 24 | [Oo]bj/ 25 | [Ll]og/ 26 | 27 | # Visual Studio 2015 cache/options directory 28 | .vs/ 29 | # Uncomment if you have tasks that create the project's static files in wwwroot 30 | #wwwroot/ 31 | 32 | # MSTest test Results 33 | [Tt]est[Rr]esult*/ 34 | [Bb]uild[Ll]og.* 35 | 36 | # NUNIT 37 | *.VisualState.xml 38 | TestResult.xml 39 | 40 | # Build Results of an ATL Project 41 | [Dd]ebugPS/ 42 | [Rr]eleasePS/ 43 | dlldata.c 44 | 45 | # .NET Core 46 | project.lock.json 47 | project.fragment.lock.json 48 | artifacts/ 49 | **/Properties/launchSettings.json 50 | 51 | *_i.c 52 | *_p.c 53 | *_i.h 54 | *.ilk 55 | *.meta 56 | *.obj 57 | *.pch 58 | *.pdb 59 | *.pgc 60 | *.pgd 61 | *.rsp 62 | *.sbr 63 | *.tlb 64 | *.tli 65 | *.tlh 66 | *.tmp 67 | *.tmp_proj 68 | *.log 69 | *.vspscc 70 | *.vssscc 71 | .builds 72 | *.pidb 73 | *.svclog 74 | *.scc 75 | 76 | # Chutzpah Test files 77 | _Chutzpah* 78 | 79 | # Visual C++ cache files 80 | ipch/ 81 | *.aps 82 | *.ncb 83 | *.opendb 84 | *.opensdf 85 | *.sdf 86 | *.cachefile 87 | *.VC.db 88 | *.VC.VC.opendb 89 | 90 | # Visual Studio profiler 91 | *.psess 92 | *.vsp 93 | *.vspx 94 | *.sap 95 | 96 | # TFS 2012 Local Workspace 97 | $tf/ 98 | 99 | # Guidance Automation Toolkit 100 | *.gpState 101 | 102 | # ReSharper is a .NET coding add-in 103 | _ReSharper*/ 104 | *.[Rr]e[Ss]harper 105 | *.DotSettings.user 106 | 107 | # JustCode is a .NET coding add-in 108 | .JustCode 109 | 110 | # TeamCity is a build add-in 111 | _TeamCity* 112 | 113 | # DotCover is a Code Coverage Tool 114 | *.dotCover 115 | 116 | # Visual Studio code coverage results 117 | *.coverage 118 | *.coveragexml 119 | 120 | # NCrunch 121 | _NCrunch_* 122 | .*crunch*.local.xml 123 | nCrunchTemp_* 124 | 125 | # MightyMoose 126 | *.mm.* 127 | AutoTest.Net/ 128 | 129 | # Web workbench (sass) 130 | .sass-cache/ 131 | 132 | # Installshield output folder 133 | [Ee]xpress/ 134 | 135 | # DocProject is a documentation generator add-in 136 | DocProject/buildhelp/ 137 | DocProject/Help/*.HxT 138 | DocProject/Help/*.HxC 139 | DocProject/Help/*.hhc 140 | DocProject/Help/*.hhk 141 | DocProject/Help/*.hhp 142 | DocProject/Help/Html2 143 | DocProject/Help/html 144 | 145 | # Click-Once directory 146 | publish/ 147 | 148 | # Publish Web Output 149 | *.[Pp]ublish.xml 150 | *.azurePubxml 151 | # TODO: Comment the next line if you want to checkin your web deploy settings 152 | # but database connection strings (with potential passwords) will be unencrypted 153 | *.pubxml 154 | *.publishproj 155 | 156 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 157 | # checkin your Azure Web App publish settings, but sensitive information contained 158 | # in these scripts will be unencrypted 159 | PublishScripts/ 160 | 161 | # NuGet Packages 162 | *.nupkg 163 | # The packages folder can be ignored because of Package Restore 164 | **/packages/* 165 | # except build/, which is used as an MSBuild target. 166 | !**/packages/build/ 167 | # Uncomment if necessary however generally it will be regenerated when needed 168 | #!**/packages/repositories.config 169 | # NuGet v3's project.json files produces more ignorable files 170 | *.nuget.props 171 | *.nuget.targets 172 | 173 | # Microsoft Azure Build Output 174 | csx/ 175 | *.build.csdef 176 | 177 | # Microsoft Azure Emulator 178 | ecf/ 179 | rcf/ 180 | 181 | # Windows Store app package directories and files 182 | AppPackages/ 183 | BundleArtifacts/ 184 | Package.StoreAssociation.xml 185 | _pkginfo.txt 186 | 187 | # Visual Studio cache files 188 | # files ending in .cache can be ignored 189 | *.[Cc]ache 190 | # but keep track of directories ending in .cache 191 | !*.[Cc]ache/ 192 | 193 | # Others 194 | ClientBin/ 195 | ~$* 196 | *~ 197 | *.dbmdl 198 | *.dbproj.schemaview 199 | *.jfm 200 | *.pfx 201 | *.publishsettings 202 | orleans.codegen.cs 203 | 204 | # Since there are multiple workflows, uncomment next line to ignore bower_components 205 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 206 | #bower_components/ 207 | 208 | # RIA/Silverlight projects 209 | Generated_Code/ 210 | 211 | # Backup & report files from converting an old project file 212 | # to a newer Visual Studio version. Backup files are not needed, 213 | # because we have git ;-) 214 | _UpgradeReport_Files/ 215 | Backup*/ 216 | UpgradeLog*.XML 217 | UpgradeLog*.htm 218 | 219 | # SQL Server files 220 | *.mdf 221 | *.ldf 222 | *.ndf 223 | 224 | # Business Intelligence projects 225 | *.rdl.data 226 | *.bim.layout 227 | *.bim_*.settings 228 | 229 | # Microsoft Fakes 230 | FakesAssemblies/ 231 | 232 | # GhostDoc plugin setting file 233 | *.GhostDoc.xml 234 | 235 | # Node.js Tools for Visual Studio 236 | .ntvs_analysis.dat 237 | node_modules/ 238 | 239 | # Typescript v1 declaration files 240 | typings/ 241 | 242 | # Visual Studio 6 build log 243 | *.plg 244 | 245 | # Visual Studio 6 workspace options file 246 | *.opt 247 | 248 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 249 | *.vbw 250 | 251 | # Visual Studio LightSwitch build output 252 | **/*.HTMLClient/GeneratedArtifacts 253 | **/*.DesktopClient/GeneratedArtifacts 254 | **/*.DesktopClient/ModelManifest.xml 255 | **/*.Server/GeneratedArtifacts 256 | **/*.Server/ModelManifest.xml 257 | _Pvt_Extensions 258 | 259 | # Paket dependency manager 260 | .paket/paket.exe 261 | paket-files/ 262 | 263 | # FAKE - F# Make 264 | .fake/ 265 | 266 | # JetBrains Rider 267 | .idea/ 268 | *.sln.iml 269 | 270 | # CodeRush 271 | .cr/ 272 | 273 | # Python Tools for Visual Studio (PTVS) 274 | __pycache__/ 275 | *.pyc 276 | 277 | # Cake - Uncomment if you are using it 278 | # tools/** 279 | # !tools/packages.config 280 | 281 | # Telerik's JustMock configuration file 282 | *.jmconfig 283 | 284 | # BizTalk build output 285 | *.btp.cs 286 | *.btm.cs 287 | *.odx.cs 288 | *.xsd.cs 289 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # [ARCHIVED] Microsoft Graph Excel Starter Sample for ASP.NET 4.6 2 | 3 | ## IMPORTANT 4 | 5 | **This project is being archived and replaced with the [Build ASP.NET MVC apps with the Microsoft Graph SDK training](https://github.com/microsoftgraph/msgraph-training-aspnetmvcapp). As part of the archival process, we're closing all open issues and pull requests.** 6 | 7 | **You can continue to use this sample "as-is", but it won't be maintained moving forward. We apologize for any inconvenience.** 8 | 9 | ## Table of contents 10 | 11 | * [Prerequisites](#prerequisites) 12 | * [Register the application](#register-the-application) 13 | * [Build and run the sample](#build-and-run-the-sample) 14 | * [Questions and comments](#questions-and-comments) 15 | * [Contributing](#contributing) 16 | * [Additional resources](#additional-resources) 17 | 18 | This sample shows how to connect an ASP.NET 4.6 MVC web app to a Microsoft work or school (Azure Active Directory) or personal (Microsoft) account using the Microsoft Graph API to retrieve a user's profile information and upload that information to an Excel workbook. It uses the [Microsoft Graph .NET Client Library](https://github.com/microsoftgraph/msgraph-sdk-dotnet) to work with data returned by Microsoft Graph. 19 | 20 | In addition, the sample uses the [Microsoft Authentication Library (MSAL)](https://www.nuget.org/packages/Microsoft.Identity.Client/) for authentication. The MSAL SDK provides features for working with the [Azure AD v2.0 endpoint](https://azure.microsoft.com/en-us/documentation/articles/active-directory-appmodel-v2-overview), which enables developers to write a single code flow that handles authentication for both work or school (Azure Active Directory) and personal (Microsoft) accounts. 21 | 22 | ## Important Note about the MSAL Preview 23 | 24 | This library is suitable for use in a production environment. We provide the same production level support for this library as we do our current production libraries. During the preview we may make changes to the API, internal cache format, and other mechanisms of this library, which you will be required to take along with bug fixes or feature improvements. This may impact your application. For instance, a change to the cache format may impact your users, such as requiring them to sign in again. An API change may require you to update your code. When we provide the General Availability release we will require you to update to the General Availability version within six months, as applications written using a preview version of library may no longer work. 25 | 26 | ## Prerequisites 27 | 28 | This sample requires the following: 29 | 30 | * [Visual Studio](https://www.visualstudio.com/en-us/downloads) 31 | * Either a [Microsoft account](https://www.outlook.com) or [Office 365 for business account](https://msdn.microsoft.com/en-us/office/office365/howto/setup-development-environment#bk_Office365Account). You can sign up for [an Office 365 Developer subscription](https://msdn.microsoft.com/en-us/office/office365/howto/setup-development-environment#bk_Office365Account) that includes the resources that you need to start building Office 365 apps. 32 | * Upload the **demo.xlsx** file in the root of this repository to the root folder of your OneDrive account. This file contains an empty table with two columns. 33 | 34 | ## Register the application 35 | 36 | 1. Determine your ASP.NET app's URL. In Visual Studio's Solution Explorer, select the **Microsoft Graph Excel REST ASPNET** project. In the **Properties** window, find the value of **URL**. Copy this value. 37 | 38 | ![Screenshot of the Visual Studio Properties window](./images/vs-project-url.jpg) 39 | 40 | 1. Open a browser and navigate to the [Azure Active Directory admin center](https://aad.portal.azure.com). Login using a **personal account** (aka: Microsoft Account) or **Work or School Account**. 41 | 42 | 1. Select **Azure Active Directory** in the left-hand navigation, then select **App registrations (Preview)** under **Manage**. 43 | 44 | ![A screenshot of the App registrations ](./images/add-portal-app-registrations.jpg) 45 | 46 | 1. Select **New registration**. On the **Register an application** page, set the values as follows. 47 | 48 | - Set **Name** to `ASPNET Excel Starter Sample`. 49 | - Set **Supported account types** to **Accounts in any organizational directory and personal Microsoft accounts**. 50 | - Under **Redirect URI**, set the first drop-down to `Web` and set the value to the ASP.NET app URL you copied in step 1. 51 | 52 | ![A screenshot of the Register an application page](./images/add-register-an-app.jpg) 53 | 54 | 1. Choose **Register**. On the **ASPNET Excel Starter Sample** page, copy the value of the **Application (client) ID** and save it, you will need it in the next step. 55 | 56 | ![A screenshot of the application ID of the new app registration](./images/add-application-id.jpg) 57 | 58 | 1. Select **Authentication** under **Manage**. Locate the **Implicit grant** section and enable **ID tokens**. Choose **Save**. 59 | 60 | ![A screenshot of the Implicit grant section](./images/add-implicit-grant.jpg) 61 | 62 | 1. Select **Certificates & secrets** under **Manage**. Select the **New client secret** button. Enter a value in **Description** and select one of the options for **Expires** and choose **Add**. 63 | 64 | ![A screenshot of the Add a client secret dialog](./images/add-new-client-secret.jpg) 65 | 66 | 1. Copy the client secret value before you leave this page. You will need it in the next step. 67 | 68 | > [!IMPORTANT] 69 | > This client secret is never shown again, so make sure you copy it now. 70 | 71 | ![A screenshot of the newly added client secret](./images/add-copy-client-secret.jpg) 72 | 73 | ## Build and run the sample 74 | 75 | 1. Download or clone the Microsoft Graph Excel Starter Sample for ASP.NET 4.6. 76 | 77 | 2. Open the sample solution in Visual Studio. 78 | 79 | 3. In the Web.config file in the root directory, replace the **ida:AppId** and **ida:AppSecret** placeholder values with the application ID and password that you copied during app registration. 80 | 81 | 4. Press F5 to build and run the sample. This will restore NuGet package dependencies and open the app. 82 | 83 | >If you see any errors while installing packages, make sure the local path where you placed the solution is not too long/deep. Moving the solution closer to the root of your drive resolves this issue. 84 | 85 | 5. Sign in with your personal or work or school account and grant the requested permissions. 86 | 87 | 6. Choose the **Get email address** button. When the operation completes, the name and email address of the signed-in user are displayed on the page. 88 | 89 | 7. Choose the **Upload to Excel** button. The application creates a new row in the demo.xlsx workbook and adds the user name and email address to that row. A Success message is displayed below the button. 90 | 91 | ## Questions and comments 92 | 93 | We'd love to get your feedback about this sample. You can send us your questions and suggestions in the [Issues](https://github.com/microsoftgraph/aspnet-excelstarter-sample/issues) section of this repository. 94 | 95 | Your feedback is important to us. Connect with us on [Stack Overflow](http://stackoverflow.com/questions/tagged/microsoftgraph). Tag your questions with [MicrosoftGraph]. 96 | 97 | ## Contributing ## 98 | 99 | If you'd like to contribute to this sample, see [CONTRIBUTING.md](CONTRIBUTING.md). 100 | 101 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. 102 | 103 | ## Additional resources 104 | 105 | - [Other Microsoft Graph Connect samples](https://github.com/MicrosoftGraph?utf8=%E2%9C%93&query=-Connect) 106 | - [Microsoft Graph overview](http://graph.microsoft.io) 107 | - [Office developer code samples](http://dev.office.com/code-samples) 108 | - [Office dev center](http://dev.office.com/) 109 | 110 | ## Copyright 111 | Copyright (c) 2019 Microsoft. All rights reserved. 112 | 113 | 114 | -------------------------------------------------------------------------------- /Microsoft Graph Excel REST ASPNET/App_GlobalResources/Resource.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Resources { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option or rebuild the Visual Studio project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Web.Application.StronglyTypedResourceProxyBuilder", "15.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resource { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resource() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Resources.Resource", global::System.Reflection.Assembly.Load("App_GlobalResources")); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | 63 | /// 64 | /// Looks up a localized string similar to About. 65 | /// 66 | internal static string About { 67 | get { 68 | return ResourceManager.GetString("About", resourceCulture); 69 | } 70 | } 71 | 72 | /// 73 | /// Looks up a localized string similar to Your application description page.. 74 | /// 75 | internal static string About_Description { 76 | get { 77 | return ResourceManager.GetString("About_Description", resourceCulture); 78 | } 79 | } 80 | 81 | /// 82 | /// Looks up a localized string similar to Microsoft Graph Excel REST sample. 83 | /// 84 | internal static string App_Name { 85 | get { 86 | return ResourceManager.GetString("App_Name", resourceCulture); 87 | } 88 | } 89 | 90 | /// 91 | /// Looks up a localized string similar to Microsoft Graph Excel sample. 92 | /// 93 | internal static string App_Name_Short { 94 | get { 95 | return ResourceManager.GetString("App_Name_Short", resourceCulture); 96 | } 97 | } 98 | 99 | /// 100 | /// Looks up a localized string similar to Caller needs to authenticate.. 101 | /// 102 | internal static string Error_AuthChallengeNeeded { 103 | get { 104 | return ResourceManager.GetString("Error_AuthChallengeNeeded", resourceCulture); 105 | } 106 | } 107 | 108 | /// 109 | /// Looks up a localized string similar to An error occurred while processing your request.. 110 | /// 111 | internal static string Error_Introduction { 112 | get { 113 | return ResourceManager.GetString("Error_Introduction", resourceCulture); 114 | } 115 | } 116 | 117 | /// 118 | /// Looks up a localized string similar to Error in . 119 | /// 120 | internal static string Error_Message { 121 | get { 122 | return ResourceManager.GetString("Error_Message", resourceCulture); 123 | } 124 | } 125 | 126 | /// 127 | /// Looks up a localized string similar to Get user info. 128 | /// 129 | internal static string Graph_GetUserInfo_Button { 130 | get { 131 | return ResourceManager.GetString("Graph_GetUserInfo_Button", resourceCulture); 132 | } 133 | } 134 | 135 | /// 136 | /// Looks up a localized string similar to Choose the <b>Get user info</b> button to get the current user's name and email. 137 | /// 138 | internal static string Graph_GetUserInfo_Instruction { 139 | get { 140 | return ResourceManager.GetString("Graph_GetUserInfo_Instruction", resourceCulture); 141 | } 142 | } 143 | 144 | /// 145 | /// Looks up a localized string similar to Current user. 146 | /// 147 | internal static string Graph_GetUserInfo_Label { 148 | get { 149 | return ResourceManager.GetString("Graph_GetUserInfo_Label", resourceCulture); 150 | } 151 | } 152 | 153 | /// 154 | /// Looks up a localized string similar to Upload to Excel. 155 | /// 156 | internal static string Graph_UploadToExcel_Button { 157 | get { 158 | return ResourceManager.GetString("Graph_UploadToExcel_Button", resourceCulture); 159 | } 160 | } 161 | 162 | /// 163 | /// Looks up a localized string similar to Success! Your info was uploaded to Excel.. 164 | /// 165 | internal static string Graph_UploadToExcel_Success_Result { 166 | get { 167 | return ResourceManager.GetString("Graph_UploadToExcel_Success_Result", resourceCulture); 168 | } 169 | } 170 | 171 | /// 172 | /// Looks up a localized string similar to Home. 173 | /// 174 | internal static string Home { 175 | get { 176 | return ResourceManager.GetString("Home", resourceCulture); 177 | } 178 | } 179 | 180 | /// 181 | /// Looks up a localized string similar to Sign in with Microsoft. 182 | /// 183 | internal static string SignIn { 184 | get { 185 | return ResourceManager.GetString("SignIn", resourceCulture); 186 | } 187 | } 188 | 189 | /// 190 | /// Looks up a localized string similar to Sign out. 191 | /// 192 | internal static string SignOut { 193 | get { 194 | return ResourceManager.GetString("SignOut", resourceCulture); 195 | } 196 | } 197 | } 198 | } 199 | -------------------------------------------------------------------------------- /README-localized/README-pt-br.md: -------------------------------------------------------------------------------- 1 | --- 2 | page_type: sample 3 | products: 4 | - office-excel 5 | - office-onedrive 6 | - ms-graph 7 | languages: 8 | - aspx 9 | - csharp 10 | description: "Este exemplo mostra como conectar um aplicativo Web ASP.NET a uma conta corporativa ou de estudante Microsoft (Azure Active Directory) usando a API do Microsoft Graph." 11 | extensions: 12 | contentType: samples 13 | technologies: 14 | - Microsoft Graph 15 | services: 16 | - Excel 17 | - OneDrive 18 | - Users 19 | createdDate: 12/4/2017 10:26:12 AM 20 | --- 21 | # Exemplo do Excel Starter no Microsoft Graph para ASP.NET 4.6 22 | 23 | ## Sumário 24 | 25 | * [Pré-requisitos](#prerequisites) 26 | * [Registrar o aplicativo](#register-the-application) 27 | * [Criar e executar o exemplo](#build-and-run-the-sample) 28 | * [Perguntas e comentários](#questions-and-comments) 29 | * [Colaboração](#contributing) 30 | * [Recursos adicionais](#additional-resources) 31 | 32 | Este exemplo mostra como conectar um aplicativo Web do ASP.NET 4.6 MVC a uma conta corporativa ou de estudante da Microsoft (Azure Active Directory) da Microsoft ou uma conta pessoal (Microsoft) usando a API do Microsoft Graph API para recuperar informações de perfil de um usuário e carregá-las em uma pasta de trabalho do Excel. O exemplo usa a [Biblioteca de Clientes .NET do Microsoft Graph](https://github.com/microsoftgraph/msgraph-sdk-dotnet) para trabalhar com dados retornados pelo Microsoft Graph. 33 | 34 | Além disso, o exemplo usa a [Biblioteca de Autenticação da Microsoft (MSAL)](https://www.nuget.org/packages/Microsoft.Identity.Client/) para autenticação. O SDK da MSAL fornece recursos para trabalhar com o [ponto de extremidade do Microsoft Azure AD versão 2.0](https://azure.microsoft.com/en-us/documentation/articles/active-directory-appmodel-v2-overview), que permite aos desenvolvedores gravar um único fluxo de código para tratar da autenticação de contas pessoais (Microsoft), corporativas ou de estudantes (Azure Active Directory). 35 | 36 | ## Observação importante sobre a Visualização da MSAL 37 | 38 | Esta biblioteca é adequada para uso em um ambiente de produção. Ela recebe o mesmo suporte de nível de produção que fornecemos às nossas bibliotecas de produção atuais. Durante a visualização, podemos fazer alterações na API, no formato de cache interno e em outros mecanismos desta biblioteca, que você será solicitado a implementar juntamente com correções de bugs ou melhorias de recursos. Isso pode impactar seu aplicativo. Por exemplo, uma alteração no formato de cache pode impactar seus usuários, exigindo que eles entrem novamente. Uma alteração na API pode requerer que você atualize seu código. Quando fornecermos a versão de Disponibilidade Geral, você será solicitado a atualizar a versão de Disponibilidade Geral no prazo de seis meses, pois os aplicativos escritos usando uma versão de visualização da biblioteca podem não funcionar mais. 39 | 40 | ## Pré-requisitos 41 | 42 | Este exemplo requer o seguinte: 43 | 44 | * [Visual Studio](https://www.visualstudio.com/en-us/downloads) 45 | * Uma [conta Microsoft](https://www.outlook.com) ou um [conta do Office 365 para empresas](https://msdn.microsoft.com/en-us/office/office365/howto/setup-development-environment#bk_Office365Account). Inscreva-se para [uma Assinatura de Desenvolvedor do Office 365](https://msdn.microsoft.com/en-us/office/office365/howto/setup-development-environment#bk_Office365Account), que inclui os recursos necessários para começar a criação de aplicativos do Office 365. 46 | * Carregue o arquivo **demo.xlsx** na raiz deste repositório para a pasta raiz da sua conta do OneDrive. Este arquivo contém uma tabela vazia com duas colunas. 47 | 48 | ## Registrar o aplicativo 49 | 50 | 1. Determine a URL do aplicativo ASP.NET. No Gerenciador de Soluções do Visual Studio, marque o projeto **ASPNET REST do Excel no Microsoft Graph**. Na janela **Propriedades**, encontre o valor da **URL**. Copie esse valor. 51 | 52 | ![Captura de tela da janela de propriedades do Visual Studio](./images/vs-project-url.jpg) 53 | 54 | 1. Abra um navegador e navegue até o [centro de administração do Azure Active Directory](https://aad.portal.azure.com). Faça logon usando uma **conta pessoal** (também conhecida como: Conta Microsoft) **Conta Corporativa ou de Estudante**. 55 | 56 | 1. Selecione **Azure Active Directory** na navegação à esquerda e, em seguida, selecione **Registros de aplicativo (Visualizar)** em **Gerenciar**. 57 | 58 | ![Captura de tela dos Registros de aplicativo](./images/add-portal-app-registrations.jpg) 59 | 60 | 1. Selecione **Novo registro**. Na página **Registrar um aplicativo**, defina os valores da seguinte forma. 61 | 62 | - Defina **Nome** como `Exemplo de ASPNET Excel`. 63 | - Defina **Tipos de contas com suporte** para **Contas em qualquer diretório organizacional e contas pessoais da Microsoft**. 64 | - Em **URI de Redirecionamento**, defina o primeiro menu suspenso como `Web` e defina o valor como a URL do aplicativo ASP.NET que você copiou na etapa 1. 65 | 66 | ![Captura de tela da página Registrar um aplicativo](./images/add-register-an-app.jpg) 67 | 68 | 1. Escolha **Registrar**. Na página **Exemplo de ASPNET Excel Starter**, copie o valor da **ID do aplicativo (cliente)** e salve-o, você precisará dele na próxima etapa. 69 | 70 | ![Captura de tela da ID do aplicativo do novo registro do aplicativo](./images/add-application-id.jpg) 71 | 72 | 1. Selecione **Autenticação** em **Gerenciar**. Localize a seção **Concessão Implícita** e habilite **Tokens de ID**. Escolha **Salvar**. 73 | 74 | ![Uma captura de tela da seção Concessão Implícita](./images/add-implicit-grant.jpg) 75 | 76 | 1. Selecione **Certificados e segredos** em **Gerenciar**. Selecione o botão **Novo segredo do cliente**. Insira um valor em **Descrição**, selecione uma das opções para **Expira** e escolha **Adicionar**. 77 | 78 | ![Uma captura de tela da caixa de diálogo Adicionar um segredo do cliente](./images/add-new-client-secret.jpg) 79 | 80 | 1. Copie o valor secreto do cliente antes de sair desta página. Você precisará dele na próxima etapa. 81 | 82 | > [!IMPORTANTE] 83 | > Este segredo do cliente nunca é mostrado novamente, portanto, copie-o agora. 84 | 85 | ![Uma captura de tela do segredo do cliente recém adicionado](./images/add-copy-client-secret.jpg) 86 | 87 | ## Criar e executar o exemplo 88 | 89 | 1. Baixe ou clone o Exemplo do Excel Starter no Microsoft Graph para ASP.NET 4.6. 90 | 91 | 2. Abra a solução de exemplo no Visual Studio. 92 | 93 | 3. No arquivo Web.config no diretório raiz, substitua os valores dos espaços reservados **ida:AppId** e **ida:AppSecret** pela ID de aplicativo e senha copiadas durante o registro do aplicativo. 94 | 95 | 4. Pressione F5 para criar e executar o exemplo. Isso restaurará dependências do pacote NuGet e abrirá o aplicativo. 96 | 97 | >Caso receba mensagens de erro durante a instalação de pacotes, verifique se o caminho para o local onde você colocou a solução não é muito longo ou extenso. Para resolver esse problema, coloque a solução junto à raiz da unidade. 98 | 99 | 5. Entre com sua conta pessoal, corporativa ou de estudante, e conceda as permissões solicitadas. 100 | 101 | 6. Escolha o botão **Obter endereço de email**. Quando a operação for concluída, o nome e o endereço de email do usuário conectado serão exibidos na página. 102 | 103 | 7. Escolha o botão **Carregar no Excel**. O aplicativo cria uma nova linha na pasta de trabalho demo.xlsx e adiciona o nome de usuário e o endereço de email a essa linha. Será exibida uma mensagem de sucesso abaixo do botão. 104 | 105 | ## Perguntas e comentários 106 | 107 | Gostaríamos de saber sua opinião sobre este exemplo. Você pode enviar perguntas e sugestões na seção [Problemas](https://github.com/microsoftgraph/aspnet-excelstarter-sample/issues) deste repositório. 108 | 109 | Seus comentários são importantes para nós. Junte-se a nós na página do [Stack Overflow](http://stackoverflow.com/questions/tagged/microsoftgraph). Marque suas perguntas com [MicrosoftGraph]. 110 | 111 | ## Colaboração ## 112 | 113 | Se quiser contribuir para esse exemplo, confira [CONTRIBUTING.md](CONTRIBUTING.md). 114 | 115 | Este projeto adotou o [Código de Conduta do Código Aberto da Microsoft](https://opensource.microsoft.com/codeofconduct/). Para saber mais, confira as [Perguntas frequentes sobre o Código de Conduta](https://opensource.microsoft.com/codeofconduct/faq/) ou entre em contato pelo [opencode@microsoft.com](mailto:opencode@microsoft.com) se tiver outras dúvidas ou comentários. 116 | 117 | ## Recursos adicionais 118 | 119 | - [Outros exemplos de conexão usando o Microsoft Graph](https://github.com/MicrosoftGraph?utf8=%E2%9C%93&query=-Connect) 120 | - [Visão geral do Microsoft Graph](http://graph.microsoft.io) 121 | - [Exemplos de código para desenvolvedores do Office](http://dev.office.com/code-samples) 122 | - [Centro de Desenvolvimento do Office](http://dev.office.com/) 123 | 124 | ## Direitos autorais 125 | Copyright (c) 2019 Microsoft. Todos os direitos reservados. 126 | 127 | 128 | -------------------------------------------------------------------------------- /README-localized/README-ru-ru.md: -------------------------------------------------------------------------------- 1 | --- 2 | page_type: sample 3 | products: 4 | - office-excel 5 | - office-onedrive 6 | - ms-graph 7 | languages: 8 | - aspx 9 | - csharp 10 | description: "В этом примере показано, как подключить веб-приложение ASP.NET к рабочей или учебной (Azure Active Directory) учетной записи Майкрософт, используя API Microsoft Graph." 11 | extensions: 12 | contentType: samples 13 | technologies: 14 | - Microsoft Graph 15 | services: 16 | - Excel 17 | - OneDrive 18 | - Users 19 | createdDate: 12/4/2017 10:26:12 AM 20 | --- 21 | # Пример использования Microsoft Graph в Excel Starter для ASP.NET 4.6 22 | 23 | ## Содержание 24 | 25 | * [Предварительные требования](#prerequisites) 26 | * [Регистрация приложения](#register-the-application) 27 | * [Сборка и запуск примера](#build-and-run-the-sample) 28 | * [Вопросы и комментарии](#questions-and-comments) 29 | * [Участие](#contributing) 30 | * [Дополнительные ресурсы](#additional-resources) 31 | 32 | В этом примере показано, как подключить веб-приложение ASP.NET 4.6 MVC к рабочей или учебной (Azure Active Directory) либо личной учетной записи Майкрософт с помощью API Microsoft Graph для получения сведений профиля пользователя и отправки этих сведений в книгу Excel. Для работы с данными, которые возвращает Microsoft Graph, используется [клиентская библиотека Microsoft Graph .NET](https://github.com/microsoftgraph/msgraph-sdk-dotnet). 33 | 34 | Кроме того, для проверки подлинности в этом примере используется [Библиотека проверки подлинности Майкрософт (Microsoft Authentication Library, MSAL)](https://www.nuget.org/packages/Microsoft.Identity.Client/). В пакете SDK MSAL предусмотрены функции для работы с [конечной точкой Azure AD версии 2.0](https://azure.microsoft.com/en-us/documentation/articles/active-directory-appmodel-v2-overview), которая позволяет разработчикам создать единый поток кода для проверки подлинности как рабочих или учебных (Azure Active Directory), так и личных учетных записей Майкрософт. 35 | 36 | ## Важное примечание о предварительной версии MSAL 37 | 38 | Эту библиотеку можно использовать в рабочей среде. Для этой библиотеки мы предоставляем тот же уровень поддержки, что и для текущих библиотек рабочей среды. Мы можем внести изменения в API, формат внутреннего кэша и другие функциональные элементы, касающиеся этой предварительной версии библиотеки, которые вам потребуется принять вместе с улучшениями или исправлениями. Это может повлиять на ваше приложение. Например, в результате изменения формата кэша пользователям может потребоваться опять выполнить вход. При изменении API может потребоваться обновить код. Когда мы предоставим общедоступный выпуск, вам потребуется выполнить обновление до общедоступной версии в течение шести месяцев, так как приложения, написанные с использованием предварительной версии библиотеки, могут больше не работать. 39 | 40 | ## Необходимые условия 41 | 42 | Для этого примера требуются следующие компоненты: 43 | 44 | * [Visual Studio](https://www.visualstudio.com/en-us/downloads) 45 | * [Учетная запись Майкрософт](https://www.outlook.com) или [учетная запись Office 365 для бизнеса](https://msdn.microsoft.com/en-us/office/office365/howto/setup-development-environment#bk_Office365Account). Вы можете [подписаться на план Office 365 для разработчиков](https://msdn.microsoft.com/en-us/office/office365/howto/setup-development-environment#bk_Office365Account), включающий ресурсы, которые необходимы для создания приложений Office 365. 46 | * Передайте файл **demo.xlsx** в корне этого репозитория в корневую папку вашей учетной записи OneDrive. Этот файл содержит пустую таблицу с двумя столбцами. 47 | 48 | ## Регистрация приложения 49 | 50 | 1. Определите URL-адрес приложения ASP.NET. В обозревателе решений Visual Studio выберите проект **Microsoft Graph Excel REST ASPNET**. В окне **Свойства** найдите **URL-адрес**. Скопируйте это значение. 51 | 52 | ![Снимок экрана: окно "Свойства" в Visual Studio](./images/vs-project-url.jpg) 53 | 54 | 1. Откройте браузер и перейдите к [Центру администрирования Azure Active Directory](https://aad.portal.azure.com). Войдите с помощью **личной учетной записи** (т. е. учетной записи Майкрософт) или **рабочей или учебной учетной записи**. 55 | 56 | 1. Выберите **Azure Active Directory** на панели навигации слева, затем выберите **Регистрация приложения (предварительная версия)** в разделе **Управление**. 57 | 58 | ![Снимок экрана раздела регистрации приложений](./images/add-portal-app-registrations.jpg) 59 | 60 | 1. Выберите **Новая регистрация**. На странице **Регистрация приложения** задайте необходимые значения следующим образом: 61 | 62 | - Для параметра **Имя** задайте значение `Пример ASPNET Excel Starter`. 63 | - Задайте для параметра **Поддерживаемые типы учетных записей** значение **Учетные записи в любом каталоге организации и личные учетные записи Майкрософт**. 64 | - В разделе **URI-адрес перенаправления** выберите в первом раскрывающемся списке пункт `Веб` и задайте URL-адрес приложения ASP.NET, который вы скопировали на первом шаге. 65 | 66 | ![Снимок экрана страницы регистрации приложения](./images/add-register-an-app.jpg) 67 | 68 | 1. Нажмите кнопку **Зарегистрировать**. На странице **Пример ASPNET Excel Starter** скопируйте значение **Идентификатор приложения (клиента)** и сохраните его — оно потребуется на следующем шаге. 69 | 70 | ![Снимок экрана с идентификатором приложения для регистрации нового приложения](./images/add-application-id.jpg) 71 | 72 | 1. Выберите **Проверка подлинности** в разделе **Управление**. Найдите раздел **Неявное представление** и включите **Маркеры идентификации**. Нажмите кнопку **Сохранить**. 73 | 74 | ![Снимок экрана: раздел "Неявное предоставление"](./images/add-implicit-grant.jpg) 75 | 76 | 1. Выберите **Сертификаты и секреты** в разделе **Управление**. Нажмите кнопку **Новый секрет клиента**. Введите значение в поле **Описание**, выберите один из вариантов для **Срок действия** и нажмите **Добавить**. 77 | 78 | ![Снимок экрана: диалоговое окно "Добавление секрета клиента"](./images/add-new-client-secret.jpg) 79 | 80 | 1. Скопируйте значение секрета клиента, а затем покиньте эту страницу. Оно вам понадобится на следующем шаге. 81 | 82 | > [ВАЖНО!] 83 | > Этот секрет клиента больше не будет отображаться, поэтому обязательно скопируйте его. 84 | 85 | ![Снимок экрана: только что добавленный секрет клиента](./images/add-copy-client-secret.jpg) 86 | 87 | ## Сборка и запуск примера 88 | 89 | 1. Скачайте или клонируйте пример Microsoft Graph Excel Starter для ASP.NET 4.6. 90 | 91 | 2. Откройте пример решения в Visual Studio. 92 | 93 | 3. В корневом каталоге в файле Web.config замените заполнители **ida:AppId** и **ida:AppSecret** идентификатором приложения и паролем, которые вы скопировали при регистрации приложения. 94 | 95 | 4. Нажмите клавишу F5 для сборки и запуска примера. При этом будут восстановлены зависимости пакета NuGet и откроется приложение. 96 | 97 | >Если при установке пакетов возникают ошибки, убедитесь, что локальный путь к решению не слишком длинный. Чтобы устранить эту проблему, переместите решение ближе к корню диска. 98 | 99 | 5. Войдите с помощью личной, рабочей или учебной учетной записи и предоставьте необходимые разрешения. 100 | 101 | 6. Нажмите кнопку **Получить адрес электронной почты**. После завершения операции на странице отобразятся имя и адрес электронной почты пользователя, выполнившего вход. 102 | 103 | 7. Нажмите кнопку **Отправить в Excel**. Приложение создаст в книге demo.xlsx новую строку и добавит в нее имя пользователя и адрес электронной почты. Под кнопкой появится сообщение об успешной операции. 104 | 105 | ## Вопросы и комментарии 106 | 107 | Мы будем рады узнать ваше мнение об этом примере. Вы можете отправлять нам свои вопросы и предложения на вкладке [Issues](https://github.com/microsoftgraph/aspnet-excelstarter-sample/issues) (Проблемы) этого репозитория. 108 | 109 | Ваш отзыв важен для нас. Для связи с нами используйте сайт [Stack Overflow](http://stackoverflow.com/questions/tagged/microsoftgraph). Помечайте свои вопросы тегом [MicrosoftGraph]. 110 | 111 | ## Участие ## 112 | 113 | Если вы хотите добавить код в этот пример, просмотрите статью [CONTRIBUTING.md](CONTRIBUTING.md). 114 | 115 | Этот проект соответствует [правилам поведения Майкрософт, касающимся обращения с открытым кодом](https://opensource.microsoft.com/codeofconduct/). Дополнительные сведения см. в разделе [вопросов и ответов о правилах поведения](https://opensource.microsoft.com/codeofconduct/faq/). Если у вас возникли вопросы или замечания, напишите нам по адресу [opencode@microsoft.com](mailto:opencode@microsoft.com). 116 | 117 | ## Дополнительные ресурсы 118 | 119 | - [Другие примеры Microsoft Graph Connect](https://github.com/MicrosoftGraph?utf8=%E2%9C%93&query=-Connect) 120 | - [Общие сведения о Microsoft Graph](http://graph.microsoft.io) 121 | - [Примеры кода решений для Office](http://dev.office.com/code-samples) 122 | - [Центр разработки для Office](http://dev.office.com/) 123 | 124 | ## Авторские права 125 | (c) Корпорация Майкрософт (Microsoft Corporation), 2019. Все права защищены. 126 | 127 | 128 | -------------------------------------------------------------------------------- /Microsoft Graph Excel REST ASPNET/App_GlobalResources/Resource.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | About 122 | Link to About page 123 | 124 | 125 | Your application description page. 126 | Description of app for About view 127 | 128 | 129 | Microsoft Graph Excel REST sample 130 | Full app name for title and copyright 131 | 132 | 133 | Microsoft Graph Excel sample 134 | Short app name for navigation bar and browser tab 135 | 136 | 137 | Caller needs to authenticate. 138 | Error message when unable to retrieve the access token silently. 139 | 140 | 141 | An error occurred while processing your request. 142 | Generic text for Error view 143 | 144 | 145 | Error in 146 | Prefix of error message sent to Error view 147 | 148 | 149 | Get user info 150 | Button text for 'user info' section in Graph view 151 | 152 | 153 | Choose the <b>Get user info</b> button to get the current user's name and email 154 | Instructions for 'user info' section in Graph view 155 | 156 | 157 | Current user 158 | Label for current user result in Graph view 159 | 160 | 161 | Upload to Excel 162 | Button text for 'upload to Excel' section in Graph view 163 | 164 | 165 | Success! Your info was uploaded to Excel. 166 | Success message for 'upload to Excel' section in Graph view 167 | 168 | 169 | Home 170 | Link to Home page 171 | 172 | 173 | Sign in with Microsoft 174 | Link to Account.SignIn action 175 | 176 | 177 | Sign out 178 | Link to Account.SignOut 179 | 180 | -------------------------------------------------------------------------------- /README-localized/README-es-es.md: -------------------------------------------------------------------------------- 1 | --- 2 | page_type: sample 3 | products: 4 | - office-excel 5 | - office-onedrive 6 | - ms-graph 7 | languages: 8 | - aspx 9 | - csharp 10 | description: "En este ejemplo se muestra cómo conectar una aplicación web ASP.NET a una cuenta profesional o educativa (Azure Active Directory) de Microsoft con la API de Microsoft Graph" 11 | extensions: 12 | contentType: samples 13 | technologies: 14 | - Microsoft Graph 15 | services: 16 | - Excel 17 | - OneDrive 18 | - Users 19 | createdDate: 12/4/2017 10:26:12 AM 20 | --- 21 | # Ejemplo de Microsoft Graph Excel Starter para ASP.NET 4.6 22 | 23 | ## Tabla de contenido 24 | 25 | * [Requisitos previos](#prerequisites) 26 | * [Registrar la aplicación](#register-the-application) 27 | * [Compilar y ejecutar el ejemplo](#build-and-run-the-sample) 28 | * [Preguntas y comentarios](#questions-and-comments) 29 | * [Colaboradores](#contributing) 30 | * [Recursos adicionales](#additional-resources) 31 | 32 | Este ejemplo muestra cómo conectar una aplicación web ASP.NET 4.6 MVC a una cuenta profesional o educativa de Microsoft (Azure Active Directory) o a una cuenta personal (Microsoft) utilizando la API de Microsoft Graph para recuperar la información del perfil de un usuario y cargar esa información en un libro de Excel. Usa la [biblioteca cliente .NET de Microsoft Graph](https://github.com/microsoftgraph/msgraph-sdk-dotnet) para trabajar con los datos devueltos por Microsoft Graph. 33 | 34 | Además, en el ejemplo se usa la [Biblioteca de autenticación de Microsoft (MSAL)](https://www.nuget.org/packages/Microsoft.Identity.Client/) para la autenticación. El SDK de MSAL ofrece características para trabajar con el [punto de conexión v2.0 de Azure AD](https://azure.microsoft.com/en-us/documentation/articles/active-directory-appmodel-v2-overview), lo que permite a los desarrolladores escribir un flujo de código único que controla la autenticación para las cuentas profesionales, educativas (Azure Active Directory) o las cuentas personales (Microsoft). 35 | 36 | ## Nota importante acerca de la vista previa de MSAL 37 | 38 | Esta biblioteca es apta para utilizarla en un entorno de producción. Ofrecemos la misma compatibilidad de nivel de producción de esta biblioteca que la de las bibliotecas de producción actual. Durante la vista previa podemos realizar cambios en la API, el formato de caché interna y otros mecanismos de esta biblioteca, que deberá tomar junto con correcciones o mejoras. Esto puede afectar a la aplicación. Por ejemplo, un cambio en el formato de caché puede afectar a los usuarios, como que se les pida que vuelvan a iniciar sesión. Un cambio de API puede requerir que actualice su código. Cuando ofrecemos la versión de disponibilidad General, deberá actualizar a la versión de disponibilidad General dentro de seis meses, ya que las aplicaciones escritas mediante una versión de vista previa de biblioteca puede que ya no funcionen. 39 | 40 | ## Requisitos previos 41 | 42 | Este ejemplo necesita lo siguiente: 43 | 44 | * [Visual Studio](https://www.visualstudio.com/en-us/downloads) 45 | * Ya sea una [cuenta de Microsoft](https://www.outlook.com) u [Office 365 para una cuenta empresarial](https://msdn.microsoft.com/en-us/office/office365/howto/setup-development-environment#bk_Office365Account). Puede registrarse para [una suscripción a Office 365 Developer](https://msdn.microsoft.com/en-us/office/office365/howto/setup-development-environment#bk_Office365Account), que incluye los recursos que necesita para comenzar a crear aplicaciones de Office 365. 46 | * Cargue el archivo **demo.xlsx** en la raíz de este repositorio en la carpeta raíz de su cuenta de OneDrive. Este archivo contiene una tabla vacía con dos columnas. 47 | 48 | ## Registrar la aplicación 49 | 50 | 1. Determine la dirección URL de la aplicación ASP.NET. En el explorador de soluciones de Visual Studio, seleccione el proyecto **Microsoft-Graph-ASPNET-Excel-Donations**. En la ventana **Propiedades**, busque el valor de la **URL**. Copie este valor. 51 | 52 | ![Captura de pantalla de la ventana de propiedades de Visual Studio](./images/vs-project-url.jpg) 53 | 54 | 1. Abra un explorador y diríjase al [Centro de administración de Azure Active Directory](https://aad.portal.azure.com). Inicie sesión con una **cuenta personal** (por ejemplo: una cuenta de Microsoft) o una **cuenta profesional o educativa**. 55 | 56 | 1. Seleccione **Azure Active Directory** en el panel de navegación izquierdo y, después, seleccione **Registros de aplicaciones (versión preliminar)** en **Administrar**. 57 | 58 | ![Una captura de pantalla de los registros de la aplicación ](./images/add-portal-app-registrations.jpg) 59 | 60 | 1. Seleccione **Nuevo registro**. En la página **Registrar una aplicación**, establezca los siguientes valores. 61 | 62 | - Establezca el **nombre** en el `ejemplo de ASPNET para Starter`. 63 | - Establezca los**Tipos de cuentas admitidas** en **Cuentas en cualquier directorio de organización y cuentas personales de Microsoft**. 64 | - En la **URI de redirección`, establezca la primera lista desplegable en la `Web` y establezca el valor en la dirección URL de la aplicación ASP.NET que copió en el paso 1. 65 | 66 | ![Captura de pantalla de la página Registrar una aplicación](./images/add-register-an-app.jpg) 67 | 68 | 1. Elija **Registrar**. En la página **Ejemplo de ASPNET Excel Starter**, copie el valor del **id. de aplicación (cliente)** y guárdelo. Lo necesitará en el siguiente paso. 69 | 70 | ![Captura de pantalla del id. de aplicación del nuevo registro de la aplicación](./images/add-application-id.jpg) 71 | 72 | 1. Seleccione **Autenticación** en **Administrar**. Localice la sección **concesión implícita** y habilite los **tokens de id.** Elija **Guardar**. 73 | 74 | ![Captura de pantalla de la sección de Concesión implícita](./images/add-implicit-grant.jpg) 75 | 76 | 1. Seleccione **certificados y secretos** en **administrar**. Seleccione el botón **Nuevo secreto de cliente**. Escriba un valor en **Descripción** y seleccione una de las opciones de **Expirar** y luego seleccione **Agregar**. 77 | 78 | ![Captura de pantalla del diálogo Agregar un cliente secreto](./images/add-new-client-secret.jpg) 79 | 80 | 1. Copie el valor del secreto del cliente antes de salir de esta página. Lo necesitará en el siguiente paso. 81 | 82 | > [¡IMPORTANTE!] 83 | > El secreto del cliente no volverá a ser mostrado, asegúrese de copiarlo en este momento. 84 | 85 | ![Captura de pantalla del nuevo secreto del cliente agregado](./images/add-copy-client-secret.jpg) 86 | 87 | ## Compilar y ejecutar el ejemplo 88 | 89 | 1. Descargue o clone el ejemplo de Microsoft Graph Excel Starter para ASP.NET 4.6 90 | 91 | 2. Abra la solución del ejemplo en Visual Studio. 92 | 93 | 3. En el archivo Web.config en el directorio raíz, reemplace los valores de los marcadores de posición en **ida:AppId** e **ida:AppSecret** por los valores que ha copiado durante el registro de la aplicación. 94 | 95 | 4. Pulse F5 para compilar y ejecutar el ejemplo. Esto restaurará las dependencias de paquetes de NuGet y abrirá la aplicación. 96 | 97 | >Si observa algún error durante la instalación de los paquetes, asegúrese de que la ruta de acceso local donde colocó la solución no es demasiado larga o profunda. Para resolver este problema, mueva la solución más cerca de la raíz de la unidad. 98 | 99 | 5. Inicie sesión con su cuenta personal, profesional o educativa y conceda los permisos solicitados. 100 | 101 | 6. Seleccione el botón **Obtener la dirección de correo electrónico**. Cuando finaliza la operación, el nombre y la dirección de correo electrónico del usuario con sesión iniciada se muestra en la página. 102 | 103 | 7. Elija el botón **Cargar a Excel**. La aplicación crea una nueva fila en el libro demo.xlsx y agrega el nombre de usuario y la dirección de correo electrónico a la misma. Se mostrará un mensaje de Éxito debajo del botón. 104 | 105 | ## Preguntas y comentarios 106 | 107 | Nos encantaría recibir sus comentarios sobre este ejemplo. Puede enviarnos sus preguntas y sugerencias a través de la sección [Problemas](https://github.com/microsoftgraph/aspnet-excelstarter-sample/issues) de este repositorio. 108 | 109 | Su opinión es importante para nosotros. Conecte con nosotros en [Stack Overflow](http://stackoverflow.com/questions/tagged/microsoftgraph). Etiquete sus preguntas con [MicrosoftGraph]. 110 | 111 | ## Colaboradores ## 112 | 113 | Si le gustaría contribuir a este ejemplo, vea [CONTRIBUTING.md](CONTRIBUTING.md). 114 | 115 | Este proyecto ha adoptado el [Código de conducta de código abierto de Microsoft](https://opensource.microsoft.com/codeofconduct/). Para obtener más información, vea [Preguntas frecuentes sobre el código de conducta](https://opensource.microsoft.com/codeofconduct/faq/) o póngase en contacto con [opencode@microsoft.com](mailto:opencode@microsoft.com) si tiene otras preguntas o comentarios. 116 | 117 | ## Recursos adicionales 118 | 119 | - [Otros ejemplos de Microsoft Graph Connect](https://github.com/MicrosoftGraph?utf8=%E2%9C%93&query=-Connect) 120 | - [Información general de Microsoft Graph](http://graph.microsoft.io) 121 | - [Ejemplos de código de Office Developer](http://dev.office.com/code-samples) 122 | - [Centro para desarrolladores de Office](http://dev.office.com/) 123 | 124 | ## Copyright 125 | Copyright (c) 2019 Microsoft. Todos los derechos reservados. 126 | 127 | 128 | -------------------------------------------------------------------------------- /README-localized/README-fr-fr.md: -------------------------------------------------------------------------------- 1 | --- 2 | page_type: sample 3 | products: 4 | - office-excel 5 | - office-onedrive 6 | - ms-graph 7 | languages: 8 | - aspx 9 | - csharp 10 | description: "Cet exemple présente la connexion entre une application web ASP.NET et Microsoft professionnel ou scolaire (Azure Active Directory) utilisant l’API Microsoft Graph." 11 | extensions: 12 | contentType: samples 13 | technologies: 14 | - Microsoft Graph 15 | services: 16 | - Excel 17 | - OneDrive 18 | - Users 19 | createdDate: 12/4/2017 10:26:12 AM 20 | --- 21 | # Exemple de démarrage Microsoft Graph Excel pour ASP.NET 4.6 22 | 23 | ## Table des matières 24 | 25 | * [Conditions préalables](#prerequisites) 26 | * [Inscription de l’application](#register-the-application) 27 | * [Création et exécution de l’exemple](#build-and-run-the-sample) 28 | * [Questions et commentaires](#questions-and-comments) 29 | * [Contribution](#contributing) 30 | * [Ressources supplémentaires](#additional-resources) 31 | 32 | Cet exemple montre comment connecter une application web ASP.NET 4.6 MVC à un compte professionnel ou scolaire (Azure Active Directory) ou personnel (Microsoft) à l’aide de l’API Microsoft Graph pour récupérer les informations de profil de l'utilisateur et les charger dans un classeur Excel. Il utilise la bibliothèque cliente [Microsoft Graph .NET](https://github.com/microsoftgraph/msgraph-sdk-dotnet) pour exploiter les données renvoyées par Microsoft Graph. 33 | 34 | En outre, l’exemple utilise la [bibliothèque d’authentification Microsoft (MSAL)](https://www.nuget.org/packages/Microsoft.Identity.Client/) pour l’authentification. Le kit de développement logiciel (SDK) MSAL offre des fonctionnalités permettant d’utiliser le [point de terminaison Azure AD v2.0](https://azure.microsoft.com/en-us/documentation/articles/active-directory-appmodel-v2-overview), qui permet aux développeurs d’écrire un flux de code unique qui gère l’authentification des comptes professionnels ou scolaires (Azure Active Directory) et personnels (Microsoft). 35 | 36 | ## Remarque importante à propos de la préversion MSAL 37 | 38 | La bibliothèque peut être utilisée dans un environnement de production. Nous fournissons la même prise en charge du niveau de production pour cette bibliothèque que pour nos bibliothèques de production actuelles. Lors de la version d’essai, nous pouvons apporter des modifications à l’API, au format de cache interne et à d’autres mécanismes de cette bibliothèque que vous devrez prendre en compte avec les correctifs de bogues ou les améliorations de fonctionnalités. Cela peut avoir un impact sur votre application. Par exemple, une modification du format de cache peut avoir un impact sur vos utilisateurs. Par exemple, il peut leur être demandé de se connecter à nouveau. Une modification de l’API peut vous obliger à mettre à jour votre code. Lorsque nous fournissons la version de disponibilité générale, vous devez effectuer une mise à jour vers la version de disponibilité générale dans un délai de six mois, car les applications écrites à l’aide de la version d’évaluation de la bibliothèque ne fonctionneront plus. 39 | 40 | ## Conditions préalables 41 | 42 | Cet exemple nécessite les éléments suivants : 43 | 44 | * [Visual Studio](https://www.visualstudio.com/en-us/downloads) 45 | * Soit un [compte Microsoft](https://www.outlook.com), soit un [compte Office 365 pour entreprise](https://msdn.microsoft.com/en-us/office/office365/howto/setup-development-environment#bk_Office365Account). Vous pouvez vous inscrire à [Office 365 Developer](https://msdn.microsoft.com/en-us/office/office365/howto/setup-development-environment#bk_Office365Account) pour accéder aux ressources dont vous avez besoin pour commencer à créer des applications Office 365. 46 | * Chargez le fichier **demo.xlsx** situé dans la racine de ce référentiel vers le dossier racine de votre compte OneDrive. Ce fichier contient un tableau vide avec deux colonnes. 47 | 48 | ## Inscription de l’application 49 | 50 | 1. Déterminez l’URL de votre application ASP.NET. Dans l’Explorateur de solutions de Visual Studio, sélectionnez le projet **Microsoft Graph Excel REST ASPNET**. Dans la fenêtre des **Propriétés**, cherchez la valeur de l’**URL**. Copiez cette valeur. 51 | 52 | ![Capture d'écran de la fenêtre des propriétés de Visual Studio](./images/vs-project-url.jpg) 53 | 54 | 1. Ouvrez un navigateur et accédez au [Centre d’administration Azure Active Directory](https://aad.portal.azure.com). Connectez-vous à l’aide d’un **compte personnel** (alias : compte Microsoft) ou d’un **compte professionnel ou scolaire**. 55 | 56 | 1. Sélectionnez **Azure Active Directory** dans le volet de navigation gauche, puis sélectionnez **Inscriptions d’applications (préversion)** sous **Gérer**. 57 | 58 | ![Capture d’écran des inscriptions d’applications ](./images/add-portal-app-registrations.jpg) 59 | 60 | 1. Sélectionnez **Nouvelle inscription**. Sur la page **Inscrire une application**, définissez les valeurs comme suit. 61 | 62 | - Attribuez un **nom** à l'`exemple de démarrage ASPNET Excel`. 63 | - Définissez les **Types de comptes pris en charge** sur **Comptes figurant dans un annuaire organisationnel et comptes Microsoft personnels**. 64 | - Sous **URI de redirection**, définissez la première flèche déroulante sur `Web` et la valeur sur l’URL d’application ASP.NET que vous avez copiée à l’étape 1. 65 | 66 | ![Une capture d’écran de la page Inscrire une application](./images/add-register-an-app.jpg) 67 | 68 | 1. Sélectionnez **Inscrire**. Sur la page **Exemple de démarrage ASPNET Excel**, copiez la valeur de **ID d’application (client)** et enregistrez-la, car vous en aurez besoin à l’étape suivante. 69 | 70 | ![Une capture d’écran de l’ID d’application de la nouvelle inscription d'application](./images/add-application-id.jpg) 71 | 72 | 1. Sélectionnez **Authentification** sous **Gérer**. Recherchez la rubrique **Octroi implicite**, puis activez **Jetons de l’ID**. Choisissez **Enregistrer**. 73 | 74 | ![Une capture d’écran de la rubrique octroi implicite](./images/add-implicit-grant.jpg) 75 | 76 | 1. Sélectionnez **Certificats et secrets** sous **Gérer**. Sélectionnez le bouton **Nouvelle clé secrète client**. Entrez une valeur dans la **Description**, sélectionnez l'une des options pour **Expire le**, puis choisissez **Ajouter**. 77 | 78 | ![Une capture d’écran de la boîte de dialogue Ajouter une clé secrète client](./images/add-new-client-secret.jpg) 79 | 80 | 1. Copiez la valeur due la clé secrète client avant de quitter cette page. Vous en aurez besoin à l’étape suivante. 81 | 82 | > [!IMPORTANT] 83 | > Cette clé secrète client n’apparaîtra plus, aussi veillez à la copier maintenant. 84 | 85 | ![Une capture d’écran de la clé secrète client récemment ajoutée](./images/add-copy-client-secret.jpg) 86 | 87 | ## Création et exécution de l’exemple 88 | 89 | 1. Téléchargez ou clonez l’exemple de démarrage Microsoft Graph Excel pour ASP.NET 4.6. 90 | 91 | 2. Ouvrez l’exemple de solution dans Visual Studio. 92 | 93 | 3. Dans le fichier Web.config dans le répertoire racine, remplacez les valeurs d’espace réservé **ida:AppId** et **ida:AppSecret** par l’ID de l’application et le mot de passe que vous avez copiés lors de l’inscription de l’application. 94 | 95 | 4. Appuyez sur F5 pour créer et exécuter l’exemple. Cela entraîne la restauration des dépendances du package NuGet et l’ouverture de l’application. 96 | 97 | >Si vous constatez des erreurs pendant l’installation des packages, vérifiez que le chemin d’accès local où vous avez sauvegardé la solution n’est pas trop long/profond. Pour résoudre ce problème, il vous suffit de déplacer la solution dans un dossier plus près du répertoire racine de votre lecteur. 98 | 99 | 5. Connectez-vous à votre compte personnel, professionnel ou scolaire et accordez les autorisations demandées. 100 | 101 | 6. Choisissez le bouton **Obtenir l’adresse de messagerie**. Une fois l’opération terminée, le nom et l’adresse de messagerie de l’utilisateur connecté s’affichent dans la page. 102 | 103 | 7. Sélectionnez le bouton **Télécharger dans Excel**. L’application crée une nouvelle ligne dans le classeur demo.xlsx et ajoute le nom d’utilisateur et l’adresse de courrier sur cette ligne. Un message de réussite s’affiche sous le bouton. 104 | 105 | ## Questions et commentaires 106 | 107 | Nous aimerions connaître votre opinion sur cet exemple. Vous pouvez nous faire part de vos questions et suggestions dans la rubrique [Problèmes](https://github.com/microsoftgraph/aspnet-excelstarter-sample/issues) de ce référentiel. 108 | 109 | Votre avis compte beaucoup pour nous. Communiquez avec nous sur [Stack Overflow](http://stackoverflow.com/questions/tagged/microsoftgraph). Posez vos questions avec la balise [MicrosoftGraph]. 110 | 111 | ## Contribution ## 112 | 113 | Si vous souhaitez contribuer à cet exemple, voir [CONTRIBUTING.md](CONTRIBUTING.md). 114 | 115 | Ce projet a adopté le [code de conduite Open Source de Microsoft](https://opensource.microsoft.com/codeofconduct/). Pour en savoir plus, reportez-vous à la [FAQ relative au code de conduite](https://opensource.microsoft.com/codeofconduct/faq/) ou contactez [opencode@microsoft.com](mailto:opencode@microsoft.com) pour toute question ou tout commentaire. 116 | 117 | ## Ressources supplémentaires 118 | 119 | - [Autres exemples de connexion avec Microsoft Graph](https://github.com/MicrosoftGraph?utf8=%E2%9C%93&query=-Connect) 120 | - [Présentation de Microsoft Graph](http://graph.microsoft.io) 121 | - [Exemples de code du développeur Office](http://dev.office.com/code-samples) 122 | - [Centre de développement Office](http://dev.office.com/) 123 | 124 | ## Copyright 125 | Copyright (c) 2019 Microsoft. Tous droits réservés. 126 | 127 | 128 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | Contribute to this documentation 2 | 3 | Thank you for your interest in our documentation! 4 | 5 | * [Ways to contribute](#ways-to-contribute) 6 | * [Contribute using GitHub](#contribute-using-github) 7 | * [Contribute using Git](#contribute-using-git) 8 | * [How to use Markdown to format your topic](#how-to-use-markdown-to-format-your-topic) 9 | * [FAQ](#faq) 10 | * [More resources](#more-resources) 11 | 12 | ## Ways to contribute 13 | 14 | Here are some ways you can contribute to this documentation: 15 | 16 | * To make small changes to an article, [Contribute using GitHub](#contribute-using-github). 17 | * To make large changes, or changes that involve code, [Contribute using Git](#contribute-using-git). 18 | * Report documentation bugs via GitHub Issues 19 | * Request new documentation at the [Office Developer Platform UserVoice](http://officespdev.uservoice.com) site. 20 | 21 | ## Contribute using GitHub 22 | 23 | Use GitHub to contribute to this documentation without having to clone the repo to your desktop. This is the easiest way to create a pull request in this repository. Use this method to make a minor change that doesn't involve code changes. 24 | 25 | **Note** Using this method allows you to contribute to one article at a time. 26 | 27 | ### To Contribute using GitHub 28 | 29 | 1. Find the article you want to contribute to on GitHub. 30 | 31 | If the article is in MSDN, choose the **suggest and submit changes** link in the **Contribute to this content** section and you'll be taken to the same article on GitHub. 32 | 2. Once you are on the article in GitHub, sign in to GitHub (get a free account [Join GitHub](https://github.com/join). 33 | 3. Choose the **pencil icon** (edit the file in your fork of this project) and make your changes in the **<>Edit file** window. 34 | 4. Scroll to the bottom and enter a description. 35 | 5. Choose **Propose file change**>**Create pull request**. 36 | 37 | You now have successfully submitted a pull request. Pull requests are typically reviewed within 10 business days. 38 | 39 | 40 | ## Contribute using Git 41 | 42 | Use Git to contribute substantive changes, such as: 43 | 44 | * Contributing code. 45 | * Contributing changes that affect meaning. 46 | * Contributing large changes to text. 47 | * Adding new topics. 48 | 49 | ### To Contribute using Git 50 | 51 | 1. If you don't have a GitHub account, set one up at [GitHub](https://github.com/join). 52 | 2. After you have an account, install Git on your computer. Follow the steps in [Setting up Git Tutorial](https://help.github.com/articles/set-up-git/). 53 | 3. To submit a pull request using Git, follow the steps in [Use GitHub, Git, and this repository](#use-github-git-and-this-repository). 54 | 4. You will be asked to sign the Contributor's License Agreement if you are: 55 | 56 | * A member of the Microsoft Open Technologies group. 57 | * A contributors who doesn't work for Microsoft. 58 | 59 | As a community member, you must sign the Contribution License Agreement (CLA) before you can contribute large submissions to a project. You only need to complete and submit the documentation once. Carefully review the document. You may be required to have your employer sign the document. 60 | 61 | Signing the CLA does not grant you rights to commit to the main repository, but it does mean that the Office Developer and Office Developer Content Publishing teams will be able to review and approve your contributions. You will be credited for your submissions. 62 | 63 | Pull requests are typically reviewed within 10 business days. 64 | 65 | ## Use GitHub, Git, and this repository 66 | 67 | **Note:** Most of the information in this section can be found in [GitHub Help] articles. If you're familiar with Git and GitHub, skip to the **Contribute and edit content** section for the specifics of the code/content flow of this repository. 68 | 69 | ### To set up your fork of the repository 70 | 71 | 1. Set up a GitHub account so you can contribute to this project. If you haven't done this, go to [GitHub](https://github.com/join) and do it now. 72 | 2. Install Git on your computer. Follow the steps in the [Setting up Git Tutorial] [Set Up Git]. 73 | 3. Create your own fork of this repository. To do this, at the top of the page, choose the **Fork** button. 74 | 4. Copy your fork to your computer. To do this, open Git Bash. At the command prompt enter: 75 | 76 | git clone https://github.com//.git 77 | 78 | Next, create a reference to the root repository by entering these commands: 79 | 80 | cd 81 | git remote add upstream https://github.com/microsoftgraph/.git 82 | git fetch upstream 83 | 84 | Congratulations! You've now set up your repository. You won't need to repeat these steps again. 85 | 86 | ### Contribute and edit content 87 | 88 | To make the contribution process as seamless as possible, follow these steps. 89 | 90 | #### To contribute and edit content 91 | 92 | 1. Create a new branch. 93 | 2. Add new content or edit existing content. 94 | 3. Submit a pull request to the main repository. 95 | 4. Delete the branch. 96 | 97 | **Important** Limit each branch to a single concept/article to streamline the work flow and reduce the chance of merge conflicts. Content appropriate for a new branch includes: 98 | 99 | * A new article. 100 | * Spelling and grammar edits. 101 | * Applying a single formatting change across a large set of articles (for example, applying a new copyright footer). 102 | 103 | #### To create a new branch 104 | 105 | 1. Open Git Bash. 106 | 2. At the Git Bash command prompt, type `git pull upstream master:`. This creates a new branch locally that is copied from the latest MicrosoftGraph master branch. 107 | 3. At the Git Bash command prompt, type `git push origin `. This alerts GitHub to the new branch. You should now see the new branch in your fork of the repository on GitHub. 108 | 4. At the Git Bash command prompt, type `git checkout ` to switch to your new branch. 109 | 110 | #### Add new content or edit existing content 111 | 112 | You navigate to the repository on your computer by using File Explorer. The repository files are in `C:\Users\\`. 113 | 114 | To edit files, open them in an editor of your choice and modify them. To create a new file, use the editor of your choice and save the new file in the appropriate location in your local copy of the repository. While working, save your work frequently. 115 | 116 | The files in `C:\Users\\` are a working copy of the new branch that you created in your local repository. Changing anything in this folder doesn't affect the local repository until you commit a change. To commit a change to the local repository, type the following commands in GitBash: 117 | 118 | git add . 119 | git commit -v -a -m "" 120 | 121 | The `add` command adds your changes to a staging area in preparation for committing them to the repository. The period after the `add` command specifies that you want to stage all of the files that you added or modified, checking subfolders recursively. (If you don't want to commit all of the changes, you can add specific files. You can also undo a commit. For help, type `git add -help` or `git status`.) 122 | 123 | The `commit` command applies the staged changes to the repository. The switch `-m` means you are providing the commit comment in the command line. The -v and -a switches can be omitted. The -v switch is for verbose output from the command, and -a does what you already did with the add command. 124 | 125 | You can commit multiple times while you are doing your work, or you can commit once when you're done. 126 | 127 | #### Submit a pull request to the main repository 128 | 129 | When you're finished with your work and are ready to have it merged into the main repository, follow these steps. 130 | 131 | #### To submit a pull request to the main repository 132 | 133 | 1. In the Git Bash command prompt, type `git push origin `. In your local repository, `origin` refers to your GitHub repository that you cloned the local repository from. This command pushes the current state of your new branch, including all commits made in the previous steps, to your GitHub fork. 134 | 2. On the GitHub site, navigate in your fork to the new branch. 135 | 3. Choose the **Pull Request** button at the top of the page. 136 | 4. Verify the Base branch is `microsoftgraph/@master` and the Head branch is `/@`. 137 | 5. Choose the **Update Commit Range** button. 138 | 6. Add a title to your pull request, and describe all the changes you're making. 139 | 7. Submit the pull request. 140 | 141 | One of the site administrators will process your pull request. Your pull request will surface on the microsoftgraph/ site under Issues. When the pull request is accepted, the issue will be resolved. 142 | 143 | #### Create a new branch after merge 144 | 145 | After a branch is successfully merged (that is, your pull request is accepted), don't continue working in that local branch. This can lead to merge conflicts if you submit another pull request. To do another update, create a new local branch from the successfully merged upstream branch, and then delete your initial local branch. 146 | 147 | For example, if your local branch X was successfully merged into the OfficeDev/microsoft-graph-docs master branch and you want to make additional updates to the content that was merged. Create a new local branch, X2, from the OfficeDev/microsoft-graph-docs master branch. To do this, open GitBash and execute the following commands: 148 | 149 | cd microsoft-graph-docs 150 | git pull upstream master:X2 151 | git push origin X2 152 | 153 | You now have local copies (in a new local branch) of the work that you submitted in branch X. The X2 branch also contains all the work other writers have merged, so if your work depends on others' work (for example, shared images), it is available in the new branch. You can verify that your previous work (and others' work) is in the branch by checking out the new branch... 154 | 155 | git checkout X2 156 | 157 | ...and verifying the content. (The `checkout` command updates the files in `C:\Users\\microsoft-graph-docs` to the current state of the X2 branch.) Once you check out the new branch, you can make updates to the content and commit them as usual. However, to avoid working in the merged branch (X) by mistake, it's best to delete it (see the following **Delete a branch** section). 158 | 159 | #### Delete a branch 160 | 161 | Once your changes are successfully merged into the main repository, delete the branch you used because you no longer need it. Any additional work should be done in a new branch. 162 | 163 | #### To delete a branch 164 | 165 | 1. In the Git Bash command prompt, type `git checkout master`. This ensures that you aren't in the branch to be deleted (which isn't allowed). 166 | 2. Next, at the command prompt, type `git branch -d `. This deletes the branch on your computer only if it has been successfully merged to the upstream repository. (You can override this behavior with the `–D` flag, but first be sure you want to do this.) 167 | 3. Finally, type `git push origin :` at the command prompt (a space before the colon and no space after it). This will delete the branch on your github fork. 168 | 169 | Congratulations, you have successfully contributed to the project! 170 | 171 | ## How to use Markdown to format your topic 172 | 173 | ### Article template 174 | 175 | The [markdown template](/articles/0-markdown-template-for-new-articles.md) contains the basic Markdown for a topic that includes a table of contents, sections with subheadings, links to other Office developer topics, links to other sites, bold text, italic text, numbered and bulleted lists, code snippets, and images. 176 | 177 | 178 | ### Standard Markdown 179 | 180 | All of the articles in this repository use Markdown. A complete introduction (and listing of all the syntax) can be found at [Markdown Home] []. 181 | 182 | ## FAQ 183 | 184 | ### How do I get a GitHub account? 185 | 186 | Fill out the form at [Join GitHub](https://github.com/join) to open a free GitHub account. 187 | 188 | ### Where do I get a Contributor's License Agreement? 189 | 190 | You will automatically be sent a notice that you need to sign the Contributor's License Agreement (CLA) if your pull request requires one. 191 | 192 | As a community member, **you must sign the Contribution License Agreement (CLA) before you can contribute large submissions to this project**. You only need complete and submit the documentation once. Carefully review the document. You may be required to have your employer sign the document. 193 | 194 | ### What happens with my contributions? 195 | 196 | When you submit your changes, via a pull request, our team will be notified and will review your pull request. You will receive notifications about your pull request from GitHub; you may also be notified by someone from our team if we need more information. We reserve the right to edit your submission for legal, style, clarity, or other issues. 197 | 198 | ### Can I become an approver for this repository's GitHub pull requests? 199 | 200 | Currently, we are not allowing external contributors to approve pull requests in this repository. 201 | 202 | ### How soon will I get a response about my change request or issue? 203 | 204 | We typically review pull requests and respond to issues within 10 business days. 205 | 206 | ## More resources 207 | 208 | * To learn more about Markdown, go to the Git creator's site [Daring Fireball]. 209 | * To learn more about using Git and GitHub, first check out the [GitHub Help section] [GitHub Help]. 210 | 211 | [GitHub Home]: http://github.com 212 | [GitHub Help]: http://help.github.com/ 213 | [Set Up Git]: http://help.github.com/win-set-up-git/ 214 | [Markdown Home]: http://daringfireball.net/projects/markdown/ 215 | [Daring Fireball]: http://daringfireball.net/ 216 | -------------------------------------------------------------------------------- /Microsoft Graph Excel REST ASPNET/Microsoft Graph Excel REST ASPNET.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Debug 8 | AnyCPU 9 | 10 | 11 | 2.0 12 | {374EF207-F626-4609-98B6-0BBBF939C59C} 13 | {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} 14 | Library 15 | Properties 16 | Microsoft_Graph_Excel_REST_ASPNET 17 | Microsoft_Graph_Excel_REST_ASPNET 18 | v4.6.1 19 | false 20 | true 21 | 44300 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | true 33 | full 34 | false 35 | bin\ 36 | DEBUG;TRACE 37 | prompt 38 | 4 39 | 40 | 41 | pdbonly 42 | true 43 | bin\ 44 | TRACE 45 | prompt 46 | 4 47 | 48 | 49 | 50 | ..\packages\Antlr.3.5.0.2\lib\Antlr3.Runtime.dll 51 | True 52 | 53 | 54 | ..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.1\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll 55 | True 56 | 57 | 58 | 59 | ..\packages\Microsoft.Identity.Client.2.7.1\lib\net45\Microsoft.Identity.Client.dll 60 | 61 | 62 | ..\packages\Microsoft.IdentityModel.Protocol.Extensions.1.0.2.206221351\lib\net45\Microsoft.IdentityModel.Protocol.Extensions.dll 63 | True 64 | 65 | 66 | ..\packages\Microsoft.Owin.3.1.0\lib\net45\Microsoft.Owin.dll 67 | 68 | 69 | ..\packages\Microsoft.Owin.Host.SystemWeb.3.0.1\lib\net45\Microsoft.Owin.Host.SystemWeb.dll 70 | True 71 | 72 | 73 | ..\packages\Microsoft.Owin.Security.3.1.0\lib\net45\Microsoft.Owin.Security.dll 74 | 75 | 76 | ..\packages\Microsoft.Owin.Security.Cookies.3.0.1\lib\net45\Microsoft.Owin.Security.Cookies.dll 77 | True 78 | 79 | 80 | ..\packages\Microsoft.Owin.Security.OpenIdConnect.3.0.1\lib\net45\Microsoft.Owin.Security.OpenIdConnect.dll 81 | True 82 | 83 | 84 | ..\packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll 85 | True 86 | 87 | 88 | ..\packages\Owin.1.0\lib\net40\Owin.dll 89 | True 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | ..\packages\System.IdentityModel.Tokens.Jwt.4.0.2.206221351\lib\net45\System.IdentityModel.Tokens.Jwt.dll 98 | True 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | True 116 | ..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll 117 | 118 | 119 | 120 | 121 | 122 | 123 | True 124 | ..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.Helpers.dll 125 | 126 | 127 | True 128 | ..\packages\Microsoft.AspNet.Mvc.5.2.3\lib\net45\System.Web.Mvc.dll 129 | 130 | 131 | ..\packages\Microsoft.AspNet.Web.Optimization.1.1.3\lib\net40\System.Web.Optimization.dll 132 | 133 | 134 | True 135 | ..\packages\Microsoft.AspNet.Razor.3.2.3\lib\net45\System.Web.Razor.dll 136 | 137 | 138 | True 139 | ..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.dll 140 | 141 | 142 | True 143 | ..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Deployment.dll 144 | 145 | 146 | True 147 | ..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Razor.dll 148 | 149 | 150 | 151 | ..\packages\WebGrease.1.6.0\lib\WebGrease.dll 152 | True 153 | 154 | 155 | 156 | 157 | True 158 | True 159 | Resource.resx 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | Global.asax 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | Designer 203 | 204 | 205 | Web.config 206 | 207 | 208 | Web.config 209 | 210 | 211 | Designer 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | GlobalResourceProxyGenerator 226 | Resource.Designer.cs 227 | 228 | 229 | 230 | 10.0 231 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | True 244 | True 245 | 21942 246 | / 247 | http://localhost:55065/ 248 | False 249 | False 250 | 251 | 252 | False 253 | 254 | 255 | 256 | 257 | 263 | -------------------------------------------------------------------------------- /Microsoft Graph Excel REST ASPNET/Content/bootstrap-theme.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v3.4.1 (https://getbootstrap.com/) 3 | * Copyright 2011-2019 Twitter, Inc. 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 5 | */.btn-danger,.btn-default,.btn-info,.btn-primary,.btn-success,.btn-warning{text-shadow:0 -1px 0 rgba(0,0,0,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075)}.btn-danger.active,.btn-danger:active,.btn-default.active,.btn-default:active,.btn-info.active,.btn-info:active,.btn-primary.active,.btn-primary:active,.btn-success.active,.btn-success:active,.btn-warning.active,.btn-warning:active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-danger.disabled,.btn-danger[disabled],.btn-default.disabled,.btn-default[disabled],.btn-info.disabled,.btn-info[disabled],.btn-primary.disabled,.btn-primary[disabled],.btn-success.disabled,.btn-success[disabled],.btn-warning.disabled,.btn-warning[disabled],fieldset[disabled] .btn-danger,fieldset[disabled] .btn-default,fieldset[disabled] .btn-info,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-success,fieldset[disabled] .btn-warning{-webkit-box-shadow:none;box-shadow:none}.btn-danger .badge,.btn-default .badge,.btn-info .badge,.btn-primary .badge,.btn-success .badge,.btn-warning .badge{text-shadow:none}.btn.active,.btn:active{background-image:none}.btn-default{background-image:-webkit-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-o-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e0e0e0));background-image:linear-gradient(to bottom,#fff 0,#e0e0e0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#dbdbdb;text-shadow:0 1px 0 #fff;border-color:#ccc}.btn-default:focus,.btn-default:hover{background-color:#e0e0e0;background-position:0 -15px}.btn-default.active,.btn-default:active{background-color:#e0e0e0;border-color:#dbdbdb}.btn-default.disabled,.btn-default.disabled.active,.btn-default.disabled.focus,.btn-default.disabled:active,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled],.btn-default[disabled].active,.btn-default[disabled].focus,.btn-default[disabled]:active,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default,fieldset[disabled] .btn-default.active,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:active,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#e0e0e0;background-image:none}.btn-primary{background-image:-webkit-linear-gradient(top,#337ab7 0,#265a88 100%);background-image:-o-linear-gradient(top,#337ab7 0,#265a88 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#265a88));background-image:linear-gradient(to bottom,#337ab7 0,#265a88 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#245580}.btn-primary:focus,.btn-primary:hover{background-color:#265a88;background-position:0 -15px}.btn-primary.active,.btn-primary:active{background-color:#265a88;border-color:#245580}.btn-primary.disabled,.btn-primary.disabled.active,.btn-primary.disabled.focus,.btn-primary.disabled:active,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled],.btn-primary[disabled].active,.btn-primary[disabled].focus,.btn-primary[disabled]:active,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-primary.active,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:active,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#265a88;background-image:none}.btn-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#419641));background-image:linear-gradient(to bottom,#5cb85c 0,#419641 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#3e8f3e}.btn-success:focus,.btn-success:hover{background-color:#419641;background-position:0 -15px}.btn-success.active,.btn-success:active{background-color:#419641;border-color:#3e8f3e}.btn-success.disabled,.btn-success.disabled.active,.btn-success.disabled.focus,.btn-success.disabled:active,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled],.btn-success[disabled].active,.btn-success[disabled].focus,.btn-success[disabled]:active,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success,fieldset[disabled] .btn-success.active,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:active,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#419641;background-image:none}.btn-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#2aabd2));background-image:linear-gradient(to bottom,#5bc0de 0,#2aabd2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#28a4c9}.btn-info:focus,.btn-info:hover{background-color:#2aabd2;background-position:0 -15px}.btn-info.active,.btn-info:active{background-color:#2aabd2;border-color:#28a4c9}.btn-info.disabled,.btn-info.disabled.active,.btn-info.disabled.focus,.btn-info.disabled:active,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled],.btn-info[disabled].active,.btn-info[disabled].focus,.btn-info[disabled]:active,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info,fieldset[disabled] .btn-info.active,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:active,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#2aabd2;background-image:none}.btn-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#eb9316));background-image:linear-gradient(to bottom,#f0ad4e 0,#eb9316 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#e38d13}.btn-warning:focus,.btn-warning:hover{background-color:#eb9316;background-position:0 -15px}.btn-warning.active,.btn-warning:active{background-color:#eb9316;border-color:#e38d13}.btn-warning.disabled,.btn-warning.disabled.active,.btn-warning.disabled.focus,.btn-warning.disabled:active,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled],.btn-warning[disabled].active,.btn-warning[disabled].focus,.btn-warning[disabled]:active,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning,fieldset[disabled] .btn-warning.active,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:active,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#eb9316;background-image:none}.btn-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c12e2a));background-image:linear-gradient(to bottom,#d9534f 0,#c12e2a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#b92c28}.btn-danger:focus,.btn-danger:hover{background-color:#c12e2a;background-position:0 -15px}.btn-danger.active,.btn-danger:active{background-color:#c12e2a;border-color:#b92c28}.btn-danger.disabled,.btn-danger.disabled.active,.btn-danger.disabled.focus,.btn-danger.disabled:active,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled],.btn-danger[disabled].active,.btn-danger[disabled].focus,.btn-danger[disabled]:active,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger,fieldset[disabled] .btn-danger.active,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:active,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#c12e2a;background-image:none}.img-thumbnail,.thumbnail{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x;background-color:#e8e8e8}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x;background-color:#2e6da4}.navbar-default{background-image:-webkit-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-o-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#f8f8f8));background-image:linear-gradient(to bottom,#fff 0,#f8f8f8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075)}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.open>a{background-image:-webkit-linear-gradient(top,#dbdbdb 0,#e2e2e2 100%);background-image:-o-linear-gradient(top,#dbdbdb 0,#e2e2e2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dbdbdb),to(#e2e2e2));background-image:linear-gradient(to bottom,#dbdbdb 0,#e2e2e2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.075);box-shadow:inset 0 3px 9px rgba(0,0,0,.075)}.navbar-brand,.navbar-nav>li>a{text-shadow:0 1px 0 rgba(255,255,255,.25)}.navbar-inverse{background-image:-webkit-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-o-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#3c3c3c),to(#222));background-image:linear-gradient(to bottom,#3c3c3c 0,#222 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);border-radius:4px}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.open>a{background-image:-webkit-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-o-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#080808),to(#0f0f0f));background-image:linear-gradient(to bottom,#080808 0,#0f0f0f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.25);box-shadow:inset 0 3px 9px rgba(0,0,0,.25)}.navbar-inverse .navbar-brand,.navbar-inverse .navbar-nav>li>a{text-shadow:0 -1px 0 rgba(0,0,0,.25)}.navbar-fixed-bottom,.navbar-fixed-top,.navbar-static-top{border-radius:0}@media (max-width:767px){.navbar .navbar-nav .open .dropdown-menu>.active>a,.navbar .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}}.alert{text-shadow:0 1px 0 rgba(255,255,255,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05)}.alert-success{background-image:-webkit-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#c8e5bc));background-image:linear-gradient(to bottom,#dff0d8 0,#c8e5bc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);background-repeat:repeat-x;border-color:#b2dba1}.alert-info{background-image:-webkit-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#b9def0));background-image:linear-gradient(to bottom,#d9edf7 0,#b9def0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);background-repeat:repeat-x;border-color:#9acfea}.alert-warning{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#f8efc0));background-image:linear-gradient(to bottom,#fcf8e3 0,#f8efc0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);background-repeat:repeat-x;border-color:#f5e79e}.alert-danger{background-image:-webkit-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-o-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#e7c3c3));background-image:linear-gradient(to bottom,#f2dede 0,#e7c3c3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);background-repeat:repeat-x;border-color:#dca7a7}.progress{background-image:-webkit-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#f5f5f5));background-image:linear-gradient(to bottom,#ebebeb 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x}.progress-bar{background-image:-webkit-linear-gradient(top,#337ab7 0,#286090 100%);background-image:-o-linear-gradient(top,#337ab7 0,#286090 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#286090));background-image:linear-gradient(to bottom,#337ab7 0,#286090 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);background-repeat:repeat-x}.progress-bar-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#449d44));background-image:linear-gradient(to bottom,#5cb85c 0,#449d44 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);background-repeat:repeat-x}.progress-bar-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#31b0d5));background-image:linear-gradient(to bottom,#5bc0de 0,#31b0d5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);background-repeat:repeat-x}.progress-bar-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#ec971f));background-image:linear-gradient(to bottom,#f0ad4e 0,#ec971f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);background-repeat:repeat-x}.progress-bar-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c9302c));background-image:linear-gradient(to bottom,#d9534f 0,#c9302c 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);background-repeat:repeat-x}.progress-bar-striped{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.list-group{border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{text-shadow:0 -1px 0 #286090;background-image:-webkit-linear-gradient(top,#337ab7 0,#2b669a 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2b669a 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2b669a));background-image:linear-gradient(to bottom,#337ab7 0,#2b669a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);background-repeat:repeat-x;border-color:#2b669a}.list-group-item.active .badge,.list-group-item.active:focus .badge,.list-group-item.active:hover .badge{text-shadow:none}.panel{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);box-shadow:0 1px 2px rgba(0,0,0,.05)}.panel-default>.panel-heading{background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.panel-primary>.panel-heading{background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}.panel-success>.panel-heading{background-image:-webkit-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#d0e9c6));background-image:linear-gradient(to bottom,#dff0d8 0,#d0e9c6 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);background-repeat:repeat-x}.panel-info>.panel-heading{background-image:-webkit-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#c4e3f3));background-image:linear-gradient(to bottom,#d9edf7 0,#c4e3f3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);background-repeat:repeat-x}.panel-warning>.panel-heading{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#faf2cc));background-image:linear-gradient(to bottom,#fcf8e3 0,#faf2cc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);background-repeat:repeat-x}.panel-danger>.panel-heading{background-image:-webkit-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-o-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#ebcccc));background-image:linear-gradient(to bottom,#f2dede 0,#ebcccc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);background-repeat:repeat-x}.well{background-image:-webkit-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#e8e8e8),to(#f5f5f5));background-image:linear-gradient(to bottom,#e8e8e8 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x;border-color:#dcdcdc;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1)} 6 | /*# sourceMappingURL=bootstrap-theme.min.css.map */ -------------------------------------------------------------------------------- /Microsoft Graph Excel REST ASPNET/Content/bootstrap-theme.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v3.4.1 (https://getbootstrap.com/) 3 | * Copyright 2011-2019 Twitter, Inc. 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 5 | */ 6 | .btn-default, 7 | .btn-primary, 8 | .btn-success, 9 | .btn-info, 10 | .btn-warning, 11 | .btn-danger { 12 | text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2); 13 | -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075); 14 | box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075); 15 | } 16 | .btn-default:active, 17 | .btn-primary:active, 18 | .btn-success:active, 19 | .btn-info:active, 20 | .btn-warning:active, 21 | .btn-danger:active, 22 | .btn-default.active, 23 | .btn-primary.active, 24 | .btn-success.active, 25 | .btn-info.active, 26 | .btn-warning.active, 27 | .btn-danger.active { 28 | -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); 29 | box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); 30 | } 31 | .btn-default.disabled, 32 | .btn-primary.disabled, 33 | .btn-success.disabled, 34 | .btn-info.disabled, 35 | .btn-warning.disabled, 36 | .btn-danger.disabled, 37 | .btn-default[disabled], 38 | .btn-primary[disabled], 39 | .btn-success[disabled], 40 | .btn-info[disabled], 41 | .btn-warning[disabled], 42 | .btn-danger[disabled], 43 | fieldset[disabled] .btn-default, 44 | fieldset[disabled] .btn-primary, 45 | fieldset[disabled] .btn-success, 46 | fieldset[disabled] .btn-info, 47 | fieldset[disabled] .btn-warning, 48 | fieldset[disabled] .btn-danger { 49 | -webkit-box-shadow: none; 50 | box-shadow: none; 51 | } 52 | .btn-default .badge, 53 | .btn-primary .badge, 54 | .btn-success .badge, 55 | .btn-info .badge, 56 | .btn-warning .badge, 57 | .btn-danger .badge { 58 | text-shadow: none; 59 | } 60 | .btn:active, 61 | .btn.active { 62 | background-image: none; 63 | } 64 | .btn-default { 65 | background-image: -webkit-linear-gradient(top, #fff 0%, #e0e0e0 100%); 66 | background-image: -o-linear-gradient(top, #fff 0%, #e0e0e0 100%); 67 | background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#e0e0e0)); 68 | background-image: linear-gradient(to bottom, #fff 0%, #e0e0e0 100%); 69 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0); 70 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 71 | background-repeat: repeat-x; 72 | border-color: #dbdbdb; 73 | text-shadow: 0 1px 0 #fff; 74 | border-color: #ccc; 75 | } 76 | .btn-default:hover, 77 | .btn-default:focus { 78 | background-color: #e0e0e0; 79 | background-position: 0 -15px; 80 | } 81 | .btn-default:active, 82 | .btn-default.active { 83 | background-color: #e0e0e0; 84 | border-color: #dbdbdb; 85 | } 86 | .btn-default.disabled, 87 | .btn-default[disabled], 88 | fieldset[disabled] .btn-default, 89 | .btn-default.disabled:hover, 90 | .btn-default[disabled]:hover, 91 | fieldset[disabled] .btn-default:hover, 92 | .btn-default.disabled:focus, 93 | .btn-default[disabled]:focus, 94 | fieldset[disabled] .btn-default:focus, 95 | .btn-default.disabled.focus, 96 | .btn-default[disabled].focus, 97 | fieldset[disabled] .btn-default.focus, 98 | .btn-default.disabled:active, 99 | .btn-default[disabled]:active, 100 | fieldset[disabled] .btn-default:active, 101 | .btn-default.disabled.active, 102 | .btn-default[disabled].active, 103 | fieldset[disabled] .btn-default.active { 104 | background-color: #e0e0e0; 105 | background-image: none; 106 | } 107 | .btn-primary { 108 | background-image: -webkit-linear-gradient(top, #337ab7 0%, #265a88 100%); 109 | background-image: -o-linear-gradient(top, #337ab7 0%, #265a88 100%); 110 | background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#265a88)); 111 | background-image: linear-gradient(to bottom, #337ab7 0%, #265a88 100%); 112 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0); 113 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 114 | background-repeat: repeat-x; 115 | border-color: #245580; 116 | } 117 | .btn-primary:hover, 118 | .btn-primary:focus { 119 | background-color: #265a88; 120 | background-position: 0 -15px; 121 | } 122 | .btn-primary:active, 123 | .btn-primary.active { 124 | background-color: #265a88; 125 | border-color: #245580; 126 | } 127 | .btn-primary.disabled, 128 | .btn-primary[disabled], 129 | fieldset[disabled] .btn-primary, 130 | .btn-primary.disabled:hover, 131 | .btn-primary[disabled]:hover, 132 | fieldset[disabled] .btn-primary:hover, 133 | .btn-primary.disabled:focus, 134 | .btn-primary[disabled]:focus, 135 | fieldset[disabled] .btn-primary:focus, 136 | .btn-primary.disabled.focus, 137 | .btn-primary[disabled].focus, 138 | fieldset[disabled] .btn-primary.focus, 139 | .btn-primary.disabled:active, 140 | .btn-primary[disabled]:active, 141 | fieldset[disabled] .btn-primary:active, 142 | .btn-primary.disabled.active, 143 | .btn-primary[disabled].active, 144 | fieldset[disabled] .btn-primary.active { 145 | background-color: #265a88; 146 | background-image: none; 147 | } 148 | .btn-success { 149 | background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%); 150 | background-image: -o-linear-gradient(top, #5cb85c 0%, #419641 100%); 151 | background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#419641)); 152 | background-image: linear-gradient(to bottom, #5cb85c 0%, #419641 100%); 153 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0); 154 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 155 | background-repeat: repeat-x; 156 | border-color: #3e8f3e; 157 | } 158 | .btn-success:hover, 159 | .btn-success:focus { 160 | background-color: #419641; 161 | background-position: 0 -15px; 162 | } 163 | .btn-success:active, 164 | .btn-success.active { 165 | background-color: #419641; 166 | border-color: #3e8f3e; 167 | } 168 | .btn-success.disabled, 169 | .btn-success[disabled], 170 | fieldset[disabled] .btn-success, 171 | .btn-success.disabled:hover, 172 | .btn-success[disabled]:hover, 173 | fieldset[disabled] .btn-success:hover, 174 | .btn-success.disabled:focus, 175 | .btn-success[disabled]:focus, 176 | fieldset[disabled] .btn-success:focus, 177 | .btn-success.disabled.focus, 178 | .btn-success[disabled].focus, 179 | fieldset[disabled] .btn-success.focus, 180 | .btn-success.disabled:active, 181 | .btn-success[disabled]:active, 182 | fieldset[disabled] .btn-success:active, 183 | .btn-success.disabled.active, 184 | .btn-success[disabled].active, 185 | fieldset[disabled] .btn-success.active { 186 | background-color: #419641; 187 | background-image: none; 188 | } 189 | .btn-info { 190 | background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%); 191 | background-image: -o-linear-gradient(top, #5bc0de 0%, #2aabd2 100%); 192 | background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#2aabd2)); 193 | background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%); 194 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0); 195 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 196 | background-repeat: repeat-x; 197 | border-color: #28a4c9; 198 | } 199 | .btn-info:hover, 200 | .btn-info:focus { 201 | background-color: #2aabd2; 202 | background-position: 0 -15px; 203 | } 204 | .btn-info:active, 205 | .btn-info.active { 206 | background-color: #2aabd2; 207 | border-color: #28a4c9; 208 | } 209 | .btn-info.disabled, 210 | .btn-info[disabled], 211 | fieldset[disabled] .btn-info, 212 | .btn-info.disabled:hover, 213 | .btn-info[disabled]:hover, 214 | fieldset[disabled] .btn-info:hover, 215 | .btn-info.disabled:focus, 216 | .btn-info[disabled]:focus, 217 | fieldset[disabled] .btn-info:focus, 218 | .btn-info.disabled.focus, 219 | .btn-info[disabled].focus, 220 | fieldset[disabled] .btn-info.focus, 221 | .btn-info.disabled:active, 222 | .btn-info[disabled]:active, 223 | fieldset[disabled] .btn-info:active, 224 | .btn-info.disabled.active, 225 | .btn-info[disabled].active, 226 | fieldset[disabled] .btn-info.active { 227 | background-color: #2aabd2; 228 | background-image: none; 229 | } 230 | .btn-warning { 231 | background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%); 232 | background-image: -o-linear-gradient(top, #f0ad4e 0%, #eb9316 100%); 233 | background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#eb9316)); 234 | background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%); 235 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0); 236 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 237 | background-repeat: repeat-x; 238 | border-color: #e38d13; 239 | } 240 | .btn-warning:hover, 241 | .btn-warning:focus { 242 | background-color: #eb9316; 243 | background-position: 0 -15px; 244 | } 245 | .btn-warning:active, 246 | .btn-warning.active { 247 | background-color: #eb9316; 248 | border-color: #e38d13; 249 | } 250 | .btn-warning.disabled, 251 | .btn-warning[disabled], 252 | fieldset[disabled] .btn-warning, 253 | .btn-warning.disabled:hover, 254 | .btn-warning[disabled]:hover, 255 | fieldset[disabled] .btn-warning:hover, 256 | .btn-warning.disabled:focus, 257 | .btn-warning[disabled]:focus, 258 | fieldset[disabled] .btn-warning:focus, 259 | .btn-warning.disabled.focus, 260 | .btn-warning[disabled].focus, 261 | fieldset[disabled] .btn-warning.focus, 262 | .btn-warning.disabled:active, 263 | .btn-warning[disabled]:active, 264 | fieldset[disabled] .btn-warning:active, 265 | .btn-warning.disabled.active, 266 | .btn-warning[disabled].active, 267 | fieldset[disabled] .btn-warning.active { 268 | background-color: #eb9316; 269 | background-image: none; 270 | } 271 | .btn-danger { 272 | background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%); 273 | background-image: -o-linear-gradient(top, #d9534f 0%, #c12e2a 100%); 274 | background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c12e2a)); 275 | background-image: linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%); 276 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0); 277 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 278 | background-repeat: repeat-x; 279 | border-color: #b92c28; 280 | } 281 | .btn-danger:hover, 282 | .btn-danger:focus { 283 | background-color: #c12e2a; 284 | background-position: 0 -15px; 285 | } 286 | .btn-danger:active, 287 | .btn-danger.active { 288 | background-color: #c12e2a; 289 | border-color: #b92c28; 290 | } 291 | .btn-danger.disabled, 292 | .btn-danger[disabled], 293 | fieldset[disabled] .btn-danger, 294 | .btn-danger.disabled:hover, 295 | .btn-danger[disabled]:hover, 296 | fieldset[disabled] .btn-danger:hover, 297 | .btn-danger.disabled:focus, 298 | .btn-danger[disabled]:focus, 299 | fieldset[disabled] .btn-danger:focus, 300 | .btn-danger.disabled.focus, 301 | .btn-danger[disabled].focus, 302 | fieldset[disabled] .btn-danger.focus, 303 | .btn-danger.disabled:active, 304 | .btn-danger[disabled]:active, 305 | fieldset[disabled] .btn-danger:active, 306 | .btn-danger.disabled.active, 307 | .btn-danger[disabled].active, 308 | fieldset[disabled] .btn-danger.active { 309 | background-color: #c12e2a; 310 | background-image: none; 311 | } 312 | .thumbnail, 313 | .img-thumbnail { 314 | -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075); 315 | box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075); 316 | } 317 | .dropdown-menu > li > a:hover, 318 | .dropdown-menu > li > a:focus { 319 | background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); 320 | background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); 321 | background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8)); 322 | background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%); 323 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0); 324 | background-repeat: repeat-x; 325 | background-color: #e8e8e8; 326 | } 327 | .dropdown-menu > .active > a, 328 | .dropdown-menu > .active > a:hover, 329 | .dropdown-menu > .active > a:focus { 330 | background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%); 331 | background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%); 332 | background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4)); 333 | background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%); 334 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0); 335 | background-repeat: repeat-x; 336 | background-color: #2e6da4; 337 | } 338 | .navbar-default { 339 | background-image: -webkit-linear-gradient(top, #ffffff 0%, #f8f8f8 100%); 340 | background-image: -o-linear-gradient(top, #ffffff 0%, #f8f8f8 100%); 341 | background-image: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#f8f8f8)); 342 | background-image: linear-gradient(to bottom, #ffffff 0%, #f8f8f8 100%); 343 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0); 344 | background-repeat: repeat-x; 345 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 346 | border-radius: 4px; 347 | -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 5px rgba(0, 0, 0, 0.075); 348 | box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 5px rgba(0, 0, 0, 0.075); 349 | } 350 | .navbar-default .navbar-nav > .open > a, 351 | .navbar-default .navbar-nav > .active > a { 352 | background-image: -webkit-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%); 353 | background-image: -o-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%); 354 | background-image: -webkit-gradient(linear, left top, left bottom, from(#dbdbdb), to(#e2e2e2)); 355 | background-image: linear-gradient(to bottom, #dbdbdb 0%, #e2e2e2 100%); 356 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0); 357 | background-repeat: repeat-x; 358 | -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.075); 359 | box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.075); 360 | } 361 | .navbar-brand, 362 | .navbar-nav > li > a { 363 | text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25); 364 | } 365 | .navbar-inverse { 366 | background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222 100%); 367 | background-image: -o-linear-gradient(top, #3c3c3c 0%, #222 100%); 368 | background-image: -webkit-gradient(linear, left top, left bottom, from(#3c3c3c), to(#222)); 369 | background-image: linear-gradient(to bottom, #3c3c3c 0%, #222 100%); 370 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0); 371 | background-repeat: repeat-x; 372 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 373 | border-radius: 4px; 374 | } 375 | .navbar-inverse .navbar-nav > .open > a, 376 | .navbar-inverse .navbar-nav > .active > a { 377 | background-image: -webkit-linear-gradient(top, #080808 0%, #0f0f0f 100%); 378 | background-image: -o-linear-gradient(top, #080808 0%, #0f0f0f 100%); 379 | background-image: -webkit-gradient(linear, left top, left bottom, from(#080808), to(#0f0f0f)); 380 | background-image: linear-gradient(to bottom, #080808 0%, #0f0f0f 100%); 381 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0); 382 | background-repeat: repeat-x; 383 | -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.25); 384 | box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.25); 385 | } 386 | .navbar-inverse .navbar-brand, 387 | .navbar-inverse .navbar-nav > li > a { 388 | text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); 389 | } 390 | .navbar-static-top, 391 | .navbar-fixed-top, 392 | .navbar-fixed-bottom { 393 | border-radius: 0; 394 | } 395 | @media (max-width: 767px) { 396 | .navbar .navbar-nav .open .dropdown-menu > .active > a, 397 | .navbar .navbar-nav .open .dropdown-menu > .active > a:hover, 398 | .navbar .navbar-nav .open .dropdown-menu > .active > a:focus { 399 | color: #fff; 400 | background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%); 401 | background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%); 402 | background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4)); 403 | background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%); 404 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0); 405 | background-repeat: repeat-x; 406 | } 407 | } 408 | .alert { 409 | text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2); 410 | -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05); 411 | box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05); 412 | } 413 | .alert-success { 414 | background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%); 415 | background-image: -o-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%); 416 | background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#c8e5bc)); 417 | background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%); 418 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0); 419 | background-repeat: repeat-x; 420 | border-color: #b2dba1; 421 | } 422 | .alert-info { 423 | background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%); 424 | background-image: -o-linear-gradient(top, #d9edf7 0%, #b9def0 100%); 425 | background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#b9def0)); 426 | background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%); 427 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0); 428 | background-repeat: repeat-x; 429 | border-color: #9acfea; 430 | } 431 | .alert-warning { 432 | background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%); 433 | background-image: -o-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%); 434 | background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#f8efc0)); 435 | background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%); 436 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0); 437 | background-repeat: repeat-x; 438 | border-color: #f5e79e; 439 | } 440 | .alert-danger { 441 | background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%); 442 | background-image: -o-linear-gradient(top, #f2dede 0%, #e7c3c3 100%); 443 | background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#e7c3c3)); 444 | background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%); 445 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0); 446 | background-repeat: repeat-x; 447 | border-color: #dca7a7; 448 | } 449 | .progress { 450 | background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%); 451 | background-image: -o-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%); 452 | background-image: -webkit-gradient(linear, left top, left bottom, from(#ebebeb), to(#f5f5f5)); 453 | background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%); 454 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0); 455 | background-repeat: repeat-x; 456 | } 457 | .progress-bar { 458 | background-image: -webkit-linear-gradient(top, #337ab7 0%, #286090 100%); 459 | background-image: -o-linear-gradient(top, #337ab7 0%, #286090 100%); 460 | background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#286090)); 461 | background-image: linear-gradient(to bottom, #337ab7 0%, #286090 100%); 462 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0); 463 | background-repeat: repeat-x; 464 | } 465 | .progress-bar-success { 466 | background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%); 467 | background-image: -o-linear-gradient(top, #5cb85c 0%, #449d44 100%); 468 | background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#449d44)); 469 | background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%); 470 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0); 471 | background-repeat: repeat-x; 472 | } 473 | .progress-bar-info { 474 | background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%); 475 | background-image: -o-linear-gradient(top, #5bc0de 0%, #31b0d5 100%); 476 | background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#31b0d5)); 477 | background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%); 478 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0); 479 | background-repeat: repeat-x; 480 | } 481 | .progress-bar-warning { 482 | background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%); 483 | background-image: -o-linear-gradient(top, #f0ad4e 0%, #ec971f 100%); 484 | background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#ec971f)); 485 | background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%); 486 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0); 487 | background-repeat: repeat-x; 488 | } 489 | .progress-bar-danger { 490 | background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%); 491 | background-image: -o-linear-gradient(top, #d9534f 0%, #c9302c 100%); 492 | background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c9302c)); 493 | background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%); 494 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0); 495 | background-repeat: repeat-x; 496 | } 497 | .progress-bar-striped { 498 | background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); 499 | background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); 500 | background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); 501 | } 502 | .list-group { 503 | border-radius: 4px; 504 | -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075); 505 | box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075); 506 | } 507 | .list-group-item.active, 508 | .list-group-item.active:hover, 509 | .list-group-item.active:focus { 510 | text-shadow: 0 -1px 0 #286090; 511 | background-image: -webkit-linear-gradient(top, #337ab7 0%, #2b669a 100%); 512 | background-image: -o-linear-gradient(top, #337ab7 0%, #2b669a 100%); 513 | background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2b669a)); 514 | background-image: linear-gradient(to bottom, #337ab7 0%, #2b669a 100%); 515 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0); 516 | background-repeat: repeat-x; 517 | border-color: #2b669a; 518 | } 519 | .list-group-item.active .badge, 520 | .list-group-item.active:hover .badge, 521 | .list-group-item.active:focus .badge { 522 | text-shadow: none; 523 | } 524 | .panel { 525 | -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); 526 | box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); 527 | } 528 | .panel-default > .panel-heading { 529 | background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); 530 | background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); 531 | background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8)); 532 | background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%); 533 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0); 534 | background-repeat: repeat-x; 535 | } 536 | .panel-primary > .panel-heading { 537 | background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%); 538 | background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%); 539 | background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4)); 540 | background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%); 541 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0); 542 | background-repeat: repeat-x; 543 | } 544 | .panel-success > .panel-heading { 545 | background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%); 546 | background-image: -o-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%); 547 | background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#d0e9c6)); 548 | background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%); 549 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0); 550 | background-repeat: repeat-x; 551 | } 552 | .panel-info > .panel-heading { 553 | background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%); 554 | background-image: -o-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%); 555 | background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#c4e3f3)); 556 | background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%); 557 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0); 558 | background-repeat: repeat-x; 559 | } 560 | .panel-warning > .panel-heading { 561 | background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%); 562 | background-image: -o-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%); 563 | background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#faf2cc)); 564 | background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%); 565 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0); 566 | background-repeat: repeat-x; 567 | } 568 | .panel-danger > .panel-heading { 569 | background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%); 570 | background-image: -o-linear-gradient(top, #f2dede 0%, #ebcccc 100%); 571 | background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#ebcccc)); 572 | background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%); 573 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0); 574 | background-repeat: repeat-x; 575 | } 576 | .well { 577 | background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%); 578 | background-image: -o-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%); 579 | background-image: -webkit-gradient(linear, left top, left bottom, from(#e8e8e8), to(#f5f5f5)); 580 | background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%); 581 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0); 582 | background-repeat: repeat-x; 583 | border-color: #dcdcdc; 584 | -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(255, 255, 255, 0.1); 585 | box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(255, 255, 255, 0.1); 586 | } 587 | /*# sourceMappingURL=bootstrap-theme.css.map */ --------------------------------------------------------------------------------