Skip to content

Instantly share code, notes, and snippets.

@jpda
Last active March 27, 2018 22:00
Show Gist options
  • Select an option

  • Save jpda/b50d4341f23c2e435cf9d17813a898ed to your computer and use it in GitHub Desktop.

Select an option

Save jpda/b50d4341f23c2e435cf9d17813a898ed to your computer and use it in GitHub Desktop.
azure ad protected function
using System.Net;
using System.Security.Claims;
public static async Task<HttpResponseMessage> Run(HttpRequestMessage req, TraceWriter log)
{
var stuff = System.Security.Claims.ClaimsPrincipal.Current.Claims.Select(x => new { x.Type, x.Value });
return req.CreateResponse(HttpStatusCode.OK, stuff);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment