Last active
February 16, 2018 04:37
-
-
Save sjwaight/183a57ed2d071d134e9ce28d363aa24e to your computer and use it in GitHub Desktop.
Simple C# code showing how you use Custom Attributes from B2C in a solution.
This file contains 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 Newtonsoft.Json.Linq; | |
public void Demo(string userObjectId) | |
{ | |
/* Lookup the specified user object using object ID | |
GraphClient can be found at https://github.com/AzureADQuickStarts/B2C-GraphAPI-DotNet */ | |
var graphResponse = await GraphClient.GetUserByObjectId(userObjectId); | |
var userJson = JObject.Parse(graphResponse); | |
// this is where our b2c-extension-app App ID is used (minus the dashes) | |
var userTierRating = userJson.SelectToken("extension_bb10b272026746f08b6f4367e8b1b1e6_TierRating"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment