Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Simple C# code showing how you use Custom Attributes from B2C in a solution.
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 */
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