This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#r "EAS Protocol.dll" | |
#r "System.Xml.Linq.dll" | |
using System; | |
using System.Net.Http.Headers; | |
using System.Xml.Linq; | |
using EAS_Protocol.WBXML; | |
public static void Run(TimerInfo myTimer,out string statuscode, out string responseBlob, TraceWriter log) | |
{ | |
log.Info($"C# Timer trigger function executed at: {DateTime.Now}"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#r "Newtonsoft.Json" | |
#r "Microsoft.Rest.ClientRuntime.dll" | |
#r "Microsoft.Bot.Connector.Utilities.dll" | |
#r "Microsoft.Bot.Connector.dll" | |
using System.Net; | |
using Microsoft.Bot.Connector; | |
public static async Task<HttpResponseMessage> Run(HttpRequestMessage req, TraceWriter log) | |
{ | |
log.Verbose($"C# HTTP trigger function processed a request. RequestUri={req.RequestUri}"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#r "Newtonsoft.Json" | |
#r "System.Configuration" | |
#r "Microsoft.IdentityModel.Clients.ActiveDirectory.dll" | |
using System.Net; | |
using System.Configuration; | |
using System.Security.Claims; | |
using System.Net.Http.Headers; | |
using Newtonsoft.Json; | |
using Microsoft.IdentityModel.Clients.ActiveDirectory; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Newtonsoft.Json; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
namespace DirectoryExtensionsApp.Models | |
{ | |
public class UserContext | |
{ | |
[JsonProperty("odata.metadata")] | |
public string userContext { get; set; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.IdentityModel.Clients.ActiveDirectory; | |
using Newtonsoft.Json; | |
using System; | |
using System.Configuration; | |
using System.Globalization; | |
using System.Net.Http; | |
using System.Security.Claims; | |
using System.Threading.Tasks; | |
using System.Web; | |
using System.Web.Mvc; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using CustomOffice365OWA.Models; | |
using System; | |
using System.Globalization; | |
using System.Net.Http; | |
using System.Threading.Tasks; | |
using System.Web.Mvc; | |
namespace CustomOffice365OWA.Controllers | |
{ | |
[RoutePrefix("Mail")] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public ActionResult Stats() | |
{ | |
var authorizationEndpoint = "https://login.windows.net/"; | |
var resource = "https://graph.windows.net"; | |
//Change port number to whatever your Visual Studio has chosen for you | |
var redirectURI = "https://localhost:44300/Home/CatchCode"; | |
string authorizationUrl = string.Format("{0}{1}/oauth2/authorize?&response_type=code&client_id={2}&resource={3}&redirect_uri={4}", | |
authorizationEndpoint, | |
ClaimsPrincipal.Current.FindFirst(TenantIdClaimType).Value, |
NewerOlder