{"id":1918,"date":"2018-11-03T05:00:41","date_gmt":"2018-11-03T05:00:41","guid":{"rendered":"https:\/\/developer.microsoft.com\/en-us\/office\/blogs\/?p=1918"},"modified":"2018-11-03T05:00:41","modified_gmt":"2018-11-03T05:00:41","slug":"30daysmsgraph-day-3-graph-explorer","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/30daysmsgraph-day-3-graph-explorer\/","title":{"rendered":"30DaysMSGraph &#8211; Day 3 &#8211; Graph Explorer"},"content":{"rendered":"<p><a href=\"https:\/\/aka.ms\/30DaysMSGraph\">List of all posts in the #30DaysMSGraph series<\/a><\/p>\n<p>In <a href=\"https:\/\/developer.microsoft.com\/en-us\/graph\/blogs\/30daysmsgraph-day-2-overview-microsoft-graph\/\">Day 2<\/a>\u00a0we discussed what is Microsoft Graph and what services are included.\u00a0 Today we&#8217;ll cover how to make your first call against Microsoft Graph using the Graph Explorer.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-1919\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/10\/31DaysMSGraph_Day3_Source-300x200.jpg\" alt=\"\" width=\"450\" height=\"300\" srcset=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/10\/31DaysMSGraph_Day3_Source-300x200.jpg 300w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/10\/31DaysMSGraph_Day3_Source-1024x683.jpg 1024w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/10\/31DaysMSGraph_Day3_Source-768x512.jpg 768w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/10\/31DaysMSGraph_Day3_Source-1536x1024.jpg 1536w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/10\/31DaysMSGraph_Day3_Source-2048x1365.jpg 2048w\" sizes=\"(max-width: 450px) 100vw, 450px\" \/><\/p>\n<p>While it may be great to read about Microsoft Graph and all that it can do it is equally important to see it in action.\u00a0 Thankfully, Microsoft Graph product group has made it extremely easy to test out queries and view examples against a demo tenant or live on your own tenant.<\/p>\n<p>You can find the Graph Explorer at <a href=\"https:\/\/developer.microsoft.com\/en-us\/graph\/graph-explorer\">https:\/\/developer.microsoft.com\/en-us\/graph\/graph-explorer<\/a> or the shortcut <a href=\"https:\/\/aka.ms\/ge\">https:\/\/aka.ms\/ge<\/a> (&#8220;ge&#8221; for Graph Explorer.)<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-1920 size-large\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/10\/Day03-GraphExplorer1-1024x507.jpg\" alt=\"\" width=\"1024\" height=\"507\" srcset=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/10\/Day03-GraphExplorer1-1024x507.jpg 1024w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/10\/Day03-GraphExplorer1-300x148.jpg 300w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/10\/Day03-GraphExplorer1-768x380.jpg 768w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/10\/Day03-GraphExplorer1.jpg 1243w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>The Graph Explorer offers several useful items for getting started with minimal effort.\u00a0 When you first access the Graph Explorer you will be able to run commands against a demo environment without needing to log in.\u00a0 If you wish to test out calls against your own Office 365 tenant, you can log in using the &#8220;Sign in with Microsoft&#8221; button on the upper left portion of the screen.<\/p>\n<p><img decoding=\"async\" class=\"size-medium wp-image-1922 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/10\/Day03-GraphExplorer3-300x56.jpg\" alt=\"\" width=\"300\" height=\"56\" \/><\/p>\n<p>Additionally, there are dozens of sample requests provided across multiple services.<\/p>\n<p><img decoding=\"async\" class=\"size-medium wp-image-1921 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/10\/Day03-GraphExplorer2-154x300.jpg\" alt=\"\" width=\"154\" height=\"300\" srcset=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/10\/Day03-GraphExplorer2-154x300.jpg 154w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/10\/Day03-GraphExplorer2.jpg 400w\" sizes=\"(max-width: 154px) 100vw, 154px\" \/><\/p>\n<p>Note that if you sign into your own tenant you may receive an error message if you call an endpoint that you do not have the appropriate permissions required.\u00a0 The error will look similar to the following:<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-1972 size-large\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/11\/Day03-GraphExplorer4-1024x60.jpg\" alt=\"\" width=\"1024\" height=\"60\" srcset=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/11\/Day03-GraphExplorer4-1024x60.jpg 1024w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/11\/Day03-GraphExplorer4-300x18.jpg 300w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/11\/Day03-GraphExplorer4-768x45.jpg 768w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/11\/Day03-GraphExplorer4-1536x90.jpg 1536w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/11\/Day03-GraphExplorer4-2048x120.jpg 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>Click <strong>modify permissions<\/strong>\u00a0in the upper left under your profile image and name (or <strong>modify your permissions<\/strong> from the error message above).<\/p>\n<p><img decoding=\"async\" class=\"size-medium wp-image-1970 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/11\/Day03-GraphExplorer5-300x139.jpg\" alt=\"\" width=\"300\" height=\"139\" srcset=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/11\/Day03-GraphExplorer5-300x139.jpg 300w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/11\/Day03-GraphExplorer5.jpg 454w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>If granting admin consent (on behalf of all other users in tenant, more on this in a later post) check the box.\u00a0 Then click <strong>Accept<\/strong>.<\/p>\n<p><img decoding=\"async\" class=\"size-medium wp-image-1973 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/11\/Day03-GraphExplorer6-174x300.jpg\" alt=\"\" width=\"174\" height=\"300\" srcset=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/11\/Day03-GraphExplorer6-174x300.jpg 174w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/11\/Day03-GraphExplorer6-594x1024.jpg 594w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/11\/Day03-GraphExplorer6-768x1324.jpg 768w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/11\/Day03-GraphExplorer6-891x1536.jpg 891w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/11\/Day03-GraphExplorer6.jpg 893w\" sizes=\"(max-width: 174px) 100vw, 174px\" \/><\/p>\n<p>Lastly, some Azure Active Directory administrators configure the domain to not allow end users to consent to applications.\u00a0 If this is the case for your domain then you may receive an error message similar to the following after attempting to grant permissions:<\/p>\n<p><img decoding=\"async\" class=\"size-medium wp-image-1969 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/11\/Day03-GraphExplorer7-300x225.jpg\" alt=\"\" width=\"300\" height=\"225\" srcset=\"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/11\/Day03-GraphExplorer7-300x225.jpg 300w, https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-content\/uploads\/sites\/73\/2018\/11\/Day03-GraphExplorer7.jpg 378w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>We will discuss more about scenarios like this in a later post.<\/p>\n<h2>Try It Out<\/h2>\n<p>Navigate to the <a href=\"https:\/\/aka.ms\/ge\">Graph Explorer<\/a>.\u00a0 Try the following calls to Microsoft Graph using the demo tenant or logging into your own tenant.<\/p>\n<p><a href=\"https:\/\/github.com\/microsoftgraph\/30DaysMSGraph-TryItOut\/blob\/master\/Day03-GraphExplorer.md\">Day 3 repo link<\/a><\/p>\n<ul>\n<li>Get logged in user\n<ul>\n<li><a href=\"https:\/\/graph.microsoft.com\/v1.0\/me\">https:\/\/graph.microsoft.com\/v1.0\/me<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>Sample response:<\/p>\n<pre>{\n\u00a0\u00a0\u00a0 \"@odata.context\": \"https:\/\/graph.microsoft.com\/v1.0\/$metadata#users\/$entity\",\n\u00a0\u00a0\u00a0 \"id\": \"48d31887-5fad-4d73-a9f5-3c356e68a038\",\n\u00a0\u00a0\u00a0 \"businessPhones\": [\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"+1 412 555 0109\"\n\u00a0\u00a0\u00a0 ],\n\u00a0\u00a0\u00a0 \"displayName\": \"Megan Bowen\",\n\u00a0\u00a0\u00a0 \"givenName\": \"Megan\",\n\u00a0\u00a0\u00a0 \"jobTitle\": \"Auditor\",\n\u00a0\u00a0\u00a0 \"mail\": \"MeganB@M365x214355.onmicrosoft.com\",\n\u00a0\u00a0\u00a0 \"mobilePhone\": null,\n\u00a0\u00a0\u00a0 \"officeLocation\": \"12\/1110\",\n\u00a0\u00a0\u00a0 \"preferredLanguage\": \"en-US\",\n\u00a0\u00a0\u00a0 \"surname\": \"Bowen\",\n\u00a0\u00a0\u00a0 \"userPrincipalName\": \"MeganB@M365x214355.onmicrosoft.com\"\n}<\/pre>\n<ul>\n<li>Get logged in user&#8217;s manager\n<ul>\n<li><a href=\"https:\/\/graph.microsoft.com\/v1.0\/me\/manager\">https:\/\/graph.microsoft.com\/v1.0\/me\/manager<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>Sample response:<\/p>\n<pre>{\n\u00a0\u00a0\u00a0 \"@odata.context\": \"https:\/\/graph.microsoft.com\/v1.0\/$metadata#directoryObjects\/$entity\",\n\u00a0\u00a0\u00a0 \"@odata.type\": \"#microsoft.graph.user\",\n\u00a0\u00a0\u00a0 \"id\": \"24fcbca3-c3e2-48bf-9ffc-c7f81b81483d\",\n\u00a0\u00a0\u00a0 \"businessPhones\": [\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \"+1 205 555 0108\"\n\u00a0\u00a0\u00a0 ],\n\u00a0\u00a0\u00a0 \"displayName\": \"Diego Siciliani\",\n\u00a0\u00a0\u00a0 \"givenName\": \"Diego\",\n\u00a0\u00a0\u00a0 \"jobTitle\": \"CVP Finance\",\n\u00a0\u00a0\u00a0 \"mail\": \"DiegoS@M365x214355.onmicrosoft.com\",\n\u00a0\u00a0\u00a0 \"mobilePhone\": null,\n\u00a0\u00a0\u00a0 \"officeLocation\": \"14\/1108\",\n\u00a0\u00a0\u00a0 \"preferredLanguage\": \"en-US\",\n\u00a0\u00a0\u00a0 \"surname\": \"Siciliani\",\n\u00a0\u00a0\u00a0 \"userPrincipalName\": \"DiegoS@M365x214355.onmicrosoft.com\"\n}\n\n<\/pre>\n<p>Join us tomorrow as we inspect the syntax for Microsoft Graph requests in <a href=\"https:\/\/developer.microsoft.com\/en-us\/graph\/blogs\/30daysmsgraph-day-4-request-syntax\">Day 4<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>While it may be great to read about Microsoft Graph and all that it can do it is equally important to see it in action.\u00a0 Thankfully, Microsoft Graph product group has made it extremely easy to test out queries and view examples against a demo tenant or live on your own tenant.<\/p>\n","protected":false},"author":73055,"featured_media":25159,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[3],"tags":[84],"class_list":["post-1918","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-microsoft-graph","tag-30daysmsgraph"],"acf":[],"blog_post_summary":"<p>While it may be great to read about Microsoft Graph and all that it can do it is equally important to see it in action.\u00a0 Thankfully, Microsoft Graph product group has made it extremely easy to test out queries and view examples against a demo tenant or live on your own tenant.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts\/1918","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/users\/73055"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/comments?post=1918"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts\/1918\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/media\/25159"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/media?parent=1918"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/categories?post=1918"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/tags?post=1918"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}