public void IdTokenParsing_B2CToken_OneEmail() { /* * "exp": 1538804860, * "nbf": 1538801260, * "ver": "1.0", * "iss": "https://login.microsoftonline.com/ba6c0d94-a8da-45b2-83ae-33871f9c2dd8/v2.0/", * "sub": "ad020f8e-b1ba-44b2-bd69-c22be86737f5", * "aud": "0a7f52dd-260e-432f-94de-b47828c3f372", * "iat": 1538801260, * "auth_time": 1538801260, * "idp": "live.com", * "name": "MSAL SDK Test", * "oid": "ad020f8e-b1ba-44b2-bd69-c22be86737f5", * "family_name": "SDK Test", * "given_name": "MSAL", * "emails": [ * "*****@*****.**", * ], * "tfp": "B2C_1_Signin", * "at_hash": "Q4O3HDClcaLl7y0uU-bJAg" * */ var addIdToken = TestConstants.CreateB2CTestTokenResponse().IdToken; var parsedToken = IdToken.Parse(addIdToken); Assert.AreEqual("*****@*****.**", parsedToken.ClaimsPrincipal.Claims.Single(c => c.Type == "emails").Value); Assert.AreEqual(ClaimValueTypes.String.ToString(), parsedToken.ClaimsPrincipal.Claims.Single(c => c.Type == "emails").ValueType); }