{"id":2387,"date":"2022-10-30T09:50:54","date_gmt":"2022-10-30T16:50:54","guid":{"rendered":"https:\/\/cknotes.com\/?p=2387"},"modified":"2022-10-30T09:50:54","modified_gmt":"2022-10-30T16:50:54","slug":"more-microsoft-graph-misc-notes","status":"publish","type":"post","link":"https:\/\/cknotes.com\/more-microsoft-graph-misc-notes\/","title":{"rendered":"More Microsoft Graph Misc Notes"},"content":{"rendered":"<p>Relaying more shared information:<\/p>\n<p>&#8220;<span style=\"font-family: Segoe UI; font-size: large;\">I also wanted to notify you that the &#8220;profile&#8221; can also be extracted without the use of Graph API (<strong>User.Read<\/strong>):<\/span><\/p>\n<div><\/div>\n<div><span style=\"font-family: Segoe UI; font-size: large;\"><a href=\"https:\/\/learn.microsoft.com\/en-us\/azure\/active-directory\/develop\/id-tokens\">https:\/\/learn.microsoft.com\/en-us\/azure\/active-directory\/develop\/id-tokens<\/a><\/span><\/div>\n<div><\/div>\n<div><span style=\"font-size: large;\"><span style=\"font-family: Segoe UI;\"><strong>id_token<\/strong> contains that information and is given along with the <strong>access_token<\/strong>\u00a0but it has to be decoded from a JWT (<\/span><a href=\"https:\/\/en.wikipedia.org\/wiki\/JSON_Web_Token\"><span style=\"font-family: Segoe UI;\">https:\/\/en.wikipedia.org\/wiki\/JSON_Web_Token<\/span><\/a><span style=\"font-family: Segoe UI;\">)<\/span><\/span><\/div>\n<div><\/div>\n<div><span style=\"font-family: Segoe UI; font-size: large;\"><strong>openid<\/strong>, <strong>profile<\/strong>, <strong>email<\/strong> and <strong>offline_access<\/strong> are like some kind of &#8220;universal&#8221; scopes which can be mixed with Graph scopes and Outlook scopes. But Graph and Outlook scopes can&#8217;t be mixed to get the same access token, they require different tokens.<\/span><\/div>\n<div><\/div>\n<div><span style=\"font-family: Segoe UI; font-size: large;\">I had to dig for a long time to find that info, hopefully it will help you.<\/span><\/div>\n<div><\/div>\n<div><span style=\"font-family: Segoe UI; font-size: large;\">Everything works now and Chilkat works great with it now.&#8221;<\/span><\/div>\n<div><\/div>\n<div><\/div>\n<div>Also.. here&#8217;s sample code for decoding an ID token:<\/div>\n<div><a href=\"https:\/\/www.example-code.com\/csharp\/decode_microsoft_graph_id_token.asp\">https:\/\/www.example-code.com\/csharp\/decode_microsoft_graph_id_token.asp<\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Relaying more shared information: &#8220;I also wanted to notify you that the &#8220;profile&#8221; can also be extracted without the use of Graph API (User.Read): https:\/\/learn.microsoft.com\/en-us\/azure\/active-directory\/develop\/id-tokens id_token contains that information and is given along with the access_token\u00a0but it has to be decoded from a JWT (https:\/\/en.wikipedia.org\/wiki\/JSON_Web_Token) openid, profile, email and offline_access are like some kind of [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[927],"tags":[943],"class_list":["post-2387","post","type-post","status-publish","format-standard","hentry","category-microsoft-graph","tag-microsoft-graph"],"_links":{"self":[{"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/posts\/2387","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/comments?post=2387"}],"version-history":[{"count":1,"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/posts\/2387\/revisions"}],"predecessor-version":[{"id":2388,"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/posts\/2387\/revisions\/2388"}],"wp:attachment":[{"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/media?parent=2387"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/categories?post=2387"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cknotes.com\/wp-json\/wp\/v2\/tags?post=2387"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}