{"id":7734,"date":"2016-12-02T16:57:59","date_gmt":"2016-12-02T07:57:59","guid":{"rendered":"https:\/\/www.ka-net.org\/blog\/?p=7734"},"modified":"2016-12-02T16:57:59","modified_gmt":"2016-12-02T07:57:59","slug":"microsoft-graph-javascript-sdk%e3%82%92%e4%bd%bf%e3%81%a3%e3%81%a6office-365-api%e3%82%92%e7%b0%a1%e5%8d%98%e3%81%ab%e5%91%bc%e3%81%b3%e5%87%ba%e3%81%99%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/www.ka-net.org\/blog\/?p=7734","title":{"rendered":"Microsoft Graph JavaScript SDK\u3092\u4f7f\u3063\u3066Office 365 API\u3092\u7c21\u5358\u306b\u547c\u3073\u51fa\u3059\u65b9\u6cd5"},"content":{"rendered":"<h4 class=\"style4a\">Office 365 Advent Calendar 2016<\/h4>\n<p>\u4eca\u5e74\u3082<a href=\"https:\/\/ja.wikipedia.org\/wiki\/%E3%82%A2%E3%83%89%E3%83%99%E3%83%B3%E3%83%88%E3%82%AB%E3%83%AC%E3%83%B3%E3%83%80%E3%83%BC\" title=\"\u30a2\u30c9\u30d9\u30f3\u30c8\u30ab\u30ec\u30f3\u30c0\u30fc - Wikipedia\" target=\"_blank\">\u30a2\u30c9\u30d9\u30f3\u30c8\u30ab\u30ec\u30f3\u30c0\u30fc(Advent calendar)<\/a>\u306e\u5b63\u7bc0\u304c\u3084\u3063\u3066\u307e\u3044\u308a\u307e\u3057\u305f\u3002<br \/>\n<a href=\"https:\/\/mvp.microsoft.com\/ja-jp\/PublicProfile\/4029057\" title=\"\u304d\u306c\u3042\u3055\" target=\"_blank\">Office Development MVP<\/a>\u3068\u3057\u3066\u3001\u4eca\u5e74\u306f\u300c<a href=\"http:\/\/www.adventar.org\/calendars\/1396\" title=\"Office 365 Advent Calendar 2016 - Adventar\" target=\"_blank\">Office 365 Advent Calendar 2016<\/a>\u300d\u306b\u53c2\u52a0\u3057\u3066\u307f\u3088\u3046\uff01\u30fb\u30fb\u30fb\u3068\u3044\u3046\u308f\u3051\u3067\u3001\u4eca\u56de\u306f<span style=\"color: #ff0000; font-weight: bold;\">Office 365<\/span>\u7d61\u307f\u306e\u30cd\u30bf\u3092\u66f8\u3044\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<h4 class=\"style4a\">Microsoft Graph JavaScript SDK<\/h4>\n<p>\u4e0b\u8a18\u306e\u3088\u3046\u306b\u5f53\u30d6\u30ed\u30b0\u3067\u3082\u3044\u304f\u3064\u304b\u8a18\u4e8b\u3092\u66f8\u3044\u3066\u3044\u307e\u3059\u304c\u3001Microsoft Graph(\u65e7Office 365 unified API)\u3092\u4f7f\u3046\u3068\u3001\u5358\u4e00\u306e\u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u3092\u4ecb\u3057\u3066OneDrive\u3084Outlook\u3001Excel\u7b49\u3001\u69d8\u3005\u306aMicrosoft\u30af\u30e9\u30a6\u30c9\u30b5\u30fc\u30d3\u30b9\u306e\u6a5f\u80fd\u3092\u547c\u3073\u51fa\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<div class=\"cardlink\"><a href=\"https:\/\/www.ka-net.org\/blog\/?p=6427\"><div class=\"cardlink_thumbnail\"><img src='https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/eyecatch-Office365-120x120.png' alt='Microsoft Graph\u3092VBA\u304b\u3089\u547c\u3073\u51fa\u3057\u3066OneNote\u306e\u30da\u30fc\u30b8\u5185\u5bb9\u3092\u53d6\u5f97\u3059\u308b' width=120 height=120 \/><\/a><\/div><div class=\"cardlink_content\"><span class=\"timestamp\">2015.12.03<\/span><div class=\"cardlink_title\"><a href=\"https:\/\/www.ka-net.org\/blog\/?p=6427\">Microsoft Graph\u3092VBA\u304b\u3089\u547c\u3073\u51fa\u3057\u3066OneNote\u306e\u30da\u30fc\u30b8\u5185\u5bb9\u3092\u53d6\u5f97\u3059\u308b <\/a><\/div><div class=\"cardlink_excerpt\">\u4ee5\u524d\u66f8\u3044\u305f\u8a18\u4e8b\u300cOffice 365 unified API\u3092VBA\u304b\u3089\u547c\u3073\u51fa\u3059\u300d\u3067\u3001VBA\u304b\u3089Office 365 unified API\u3092\u547c\u3073\u51fa\u3059\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3057\u305f\u304c\u3001\u300cOffice Dev Center - Office 365 unified API ...<\/div><\/div><div class=\"cardlink_footer\"><\/div><\/div>\n<div class=\"cardlink\"><a href=\"https:\/\/www.ka-net.org\/blog\/?p=7540\"><div class=\"cardlink_thumbnail\"><img src='https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/MicrosoftGraph_v2endpoint_01_11-120x120.jpg' alt='Microsoft \u30a2\u30ab\u30a6\u30f3\u30c8 + v2.0 \u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8 + JavaScript\u3067Microsoft Graph\u3092\u547c\u3073\u51fa\u3059\u65b9\u6cd5' width=120 height=120 \/><\/a><\/div><div class=\"cardlink_content\"><span class=\"timestamp\">2016.10.25<\/span><div class=\"cardlink_title\"><a href=\"https:\/\/www.ka-net.org\/blog\/?p=7540\">Microsoft \u30a2\u30ab\u30a6\u30f3\u30c8 + v2.0 \u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8 + JavaScript\u3067Microsoft Graph\u3092\u547c\u3073\u51fa\u3059\u65b9\u6cd5 <\/a><\/div><div class=\"cardlink_excerpt\">JavaScript\u3060\u3051\u3067Microsoft Graph\u3092\u547c\u3073\u51fa\u3059\u5834\u5408\u3001\u3053\u308c\u307e\u3067\u306f\u4e0b\u8a18\u8a18\u4e8b\u306e\u3088\u3046\u306b\u9762\u5012\u306a\u624b\u9806\u3092\u8e0f\u3080\u5fc5\u8981\u304c\u3042\u308a\u307e\u3057\u305f\u3002\r\n\r\n\r\n\r\n\u3068\u3053\u308d\u304c\u3001v2.0 \u30a8\u30f3\u30c9\u30dd\u30a4\u30f3\u30c8\u306e\u767b\u5834\u306b\u3088\u308a\u3001\u7c21\u5358\u306b\u3001\u3057\u304b\u3082Microsoft \u30a2\u30ab\u30a6\u30f3\u30c8\u304b\u3089\u3067\u3082Graph ...<\/div><\/div><div class=\"cardlink_footer\"><\/div><\/div>\n<div class=\"cardlink\"><a href=\"https:\/\/www.ka-net.org\/blog\/?p=6874\"><div class=\"cardlink_thumbnail\"><img src='https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/eyecatch-Excel-120x120.png' alt='Excel REST API\u3092VBA\u304b\u3089\u547c\u3073\u51fa\u3059\u65b9\u6cd5' width=120 height=120 \/><\/a><\/div><div class=\"cardlink_content\"><span class=\"timestamp\">2016.03.31<\/span><div class=\"cardlink_title\"><a href=\"https:\/\/www.ka-net.org\/blog\/?p=6874\">Excel REST API\u3092VBA\u304b\u3089\u547c\u3073\u51fa\u3059\u65b9\u6cd5 <\/a><\/div><div class=\"cardlink_excerpt\">\u300cMicrosoft Graph\u3092VBA\u304b\u3089\u547c\u3073\u51fa\u3057\u3066OneNote\u306e\u30da\u30fc\u30b8\u5185\u5bb9\u3092\u53d6\u5f97\u3059\u308b\u300d\u8a18\u4e8b\u3067\u89e6\u308c\u3066\u3044\u305f\u201cExcel REST API\u201d\u3067\u3059\u304c\u3001\u77e5\u3089\u306c\u9593\u306b\u4f7f\u3048\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u305f\u307f\u305f\u3044\u3067\u3059\u3002\r\n\r\n\r\n\u305d\u308c\u306a\u3089\u3070\u3084\u308b\u3053\u3068\u306f\u4e00\u3064\u3002\r\nVBA\u304b\u3089\u547c\u3073\u51fa\u3057\u3066\u307f\u305f\u3044...<\/div><\/div><div class=\"cardlink_footer\"><\/div><\/div>\n<div class=\"cardlink\"><a href=\"https:\/\/www.ka-net.org\/blog\/?p=5664\"><div class=\"cardlink_thumbnail\"><img src='https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/eyecatch-Office365-120x120.png' alt='Office 365 unified API\u3092JavaScript\u3060\u3051\u3067\u547c\u3073\u51fa\u3059' width=120 height=120 \/><\/a><\/div><div class=\"cardlink_content\"><span class=\"timestamp\">2015.06.01<\/span><div class=\"cardlink_title\"><a href=\"https:\/\/www.ka-net.org\/blog\/?p=5664\">Office 365 unified API\u3092JavaScript\u3060\u3051\u3067\u547c\u3073\u51fa\u3059 <\/a><\/div><div class=\"cardlink_excerpt\">Microsoft\u306e\u677e\u5d0e\u3055\u3093\u306e\u30d6\u30ed\u30b0\u306b\u4e0b\u8a18\u306e\u8a18\u4e8b\u304c\u3042\u308a\u307e\u3057\u305f\u3002\r\n\r\n\r\n\u30fbOffice 365 API : CORS \u306e\u4f7f\u7528 - \u677e\u5d0e \u525b Blog\r\nhttp:\/\/blogs.msdn.com\/b\/tsmatsuz\/archive\/2015\/05\/13\/o...<\/div><\/div><div class=\"cardlink_footer\"><\/div><\/div>\n<p>\u958b\u767a\u3092\u697d\u306b\u3057\u3066\u304f\u308c\u308b<a href=\"https:\/\/graph.microsoft.io\/en-us\/code-samples-and-sdks\" title=\"Microsoft Graph - Samples &#038; SDKs\" target=\"_blank\">SDK<\/a>\u3082\u516c\u958b\u3055\u308c\u3066\u3044\u3066\u3001\u3082\u3061\u308d\u3093\u3001<a href=\"https:\/\/github.com\/microsoftgraph\/msgraph-sdk-javascript\" title=\"Microsoft Graph JavaScript SDK\" target=\"_blank\">JavaScript\u7528\u306eSDK<\/a>\u3082\u7528\u610f\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306f\u3053\u306eMicrosoft Graph JavaScript SDK\u3092\u5229\u7528\u3057\u3066\u3001\u30d6\u30e9\u30a6\u30b6\u30fc\u30d9\u30fc\u30b9\u306eWeb\u30a2\u30d7\u30ea\u304b\u3089\u3001Office 365\u306eAPI\u3092\u547c\u3073\u51fa\u3057\u3066\u307f\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<h4 class=\"style4a\">Azure AD\u3078\u306e\u30a2\u30d7\u30ea\u306e\u767b\u9332<\/h4>\n<p>Office 365 API\u3092\u547c\u3073\u51fa\u3059\u306b\u5f53\u305f\u308a\u3001<a href=\"https:\/\/msdn.microsoft.com\/ja-jp\/office\/office365\/howto\/setup-development-environment#bk_CreateAzureSubscription\" title=\"Office 365 \u958b\u767a\u74b0\u5883\u306e\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7 | MSDN\" target=\"_blank\">Office 365\u30a2\u30ab\u30a6\u30f3\u30c8\u3068Azure AD\u306e\u7d10\u4ed8\u3051<\/a>\u3084\u3001<a href=\"https:\/\/msdn.microsoft.com\/ja-jp\/office\/office365\/howto\/add-common-consent-manually\" title=\"Office 365 API \u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u3088\u3046\u306b\u30a2\u30d7\u30ea\u3092\u624b\u52d5\u3067 Azure AD \u306b\u767b\u9332\u3059\u308b | MSDN\" target=\"_blank\">Azure AD\u3078\u306e\u30a2\u30d7\u30ea\u306e\u767b\u9332<\/a>\u3092\u884c\u3046\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u3053\u3053\u3067\u306f\u3001Office 365\u30a2\u30ab\u30a6\u30f3\u30c8\u3068Azure AD\u306e\u7d10\u4ed8\u3051\u304c\u3059\u3067\u306b\u7d42\u308f\u3063\u3066\u3044\u308b\u3053\u3068\u3092\u524d\u63d0\u3068\u3057\u3066\u8a71\u3092\u9032\u3081\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<ol>\n<li><a href=\"https:\/\/portal.azure.com\/\" title=\"Azure portal\" target=\"_blank\">Azure portal<\/a>\u306b\u30b5\u30a4\u30f3\u30a4\u30f3\u3057\u3001Azure Active Directory \u2192 <span style=\"color: #ff0000; font-weight: bold;\">\u30a2\u30d7\u30ea\u306e\u767b\u9332<\/span>\u3092\u958b\u304d\u307e\u3059\u3002<\/li>\n<li>\u300c<span style=\"color: #ff0000; font-weight: bold;\">\u8ffd\u52a0<\/span>\u300d\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u3001<span style=\"color: #ff0000; font-weight: bold;\">\u540d\u524d<\/span>\u3001<span style=\"color: #ff0000; font-weight: bold;\">\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u7a2e\u985e\uff1a\u30cd\u30a4\u30c6\u30a3\u30d6<\/span>\u3001<span style=\"color: #ff0000; font-weight: bold;\">\u30ea\u30c0\u30a4\u30ec\u30af\u30c8 URI<\/span>(\u79c1\u306f\u30ed\u30fc\u30ab\u30eb\u30b5\u30fc\u30d0\u30fc\u306e<a href=\"https:\/\/www.apachefriends.org\/jp\/index.html\" title=\"XAMPP Installers and Downloads for Apache Friends\" target=\"_blank\">XAMPP<\/a>\u3092\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u74b0\u5883\u306f\u4f55\u3067\u3082\u69cb\u3044\u307e\u305b\u3093)\u3092\u5165\u529b\u5f8c\u3001\u300c<span style=\"color: #ff0000; font-weight: bold;\">\u4f5c\u6210<\/span>\u300d\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<\/li>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/MicrosoftGraphJavaScriptSDK_Sample_01.png\" alt=\"microsoftgraphjavascriptsdk_sample_01\" width=\"1072\" height=\"855\" class=\"alignnone size-full wp-image-7738\" srcset=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/MicrosoftGraphJavaScriptSDK_Sample_01.png 1072w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/MicrosoftGraphJavaScriptSDK_Sample_01-300x239.png 300w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/MicrosoftGraphJavaScriptSDK_Sample_01-768x613.png 768w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/MicrosoftGraphJavaScriptSDK_Sample_01-1024x817.png 1024w\" sizes=\"auto, (max-width: 1072px) 100vw, 1072px\" \/><\/p>\n<li>\u30a2\u30d7\u30ea\u304c\u7121\u4e8b\u306b\u767b\u9332\u3055\u308c\u305f\u3089\u3001\u300c<span style=\"color: #ff0000; font-weight: bold;\">\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3 ID<\/span>\u300d(\u30af\u30e9\u30a4\u30a2\u30f3\u30c8 ID)\u3092\u30b3\u30d4\u30fc\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/li>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/MicrosoftGraphJavaScriptSDK_Sample_02.png\" alt=\"microsoftgraphjavascriptsdk_sample_02\" width=\"892\" height=\"427\" class=\"alignnone size-full wp-image-7739\" srcset=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/MicrosoftGraphJavaScriptSDK_Sample_02.png 892w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/MicrosoftGraphJavaScriptSDK_Sample_02-300x144.png 300w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/MicrosoftGraphJavaScriptSDK_Sample_02-768x368.png 768w\" sizes=\"auto, (max-width: 892px) 100vw, 892px\" \/><\/p>\n<li>\u300c<span style=\"color: #ff0000; font-weight: bold;\">\u5fc5\u8981\u306a\u30a2\u30af\u30bb\u30b9\u8a31\u53ef<\/span>\u300d\u304b\u3089\u300c<span style=\"color: #ff0000; font-weight: bold;\">Microsoft Graph<\/span>\u300d\u3092\u9078\u629e\u3057\u307e\u3059\u3002<\/li>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/MicrosoftGraphJavaScriptSDK_Sample_03.png\" alt=\"microsoftgraphjavascriptsdk_sample_03\" width=\"871\" height=\"327\" class=\"alignnone size-full wp-image-7740\" srcset=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/MicrosoftGraphJavaScriptSDK_Sample_03.png 871w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/MicrosoftGraphJavaScriptSDK_Sample_03-300x113.png 300w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/MicrosoftGraphJavaScriptSDK_Sample_03-768x288.png 768w\" sizes=\"auto, (max-width: 871px) 100vw, 871px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/MicrosoftGraphJavaScriptSDK_Sample_04.png\" alt=\"microsoftgraphjavascriptsdk_sample_04\" width=\"872\" height=\"816\" class=\"alignnone size-full wp-image-7741\" srcset=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/MicrosoftGraphJavaScriptSDK_Sample_04.png 872w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/MicrosoftGraphJavaScriptSDK_Sample_04-300x281.png 300w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/MicrosoftGraphJavaScriptSDK_Sample_04-768x719.png 768w\" sizes=\"auto, (max-width: 872px) 100vw, 872px\" \/><\/p>\n<li>\u30a2\u30af\u30bb\u30b9\u8a31\u53ef\u306e\u9078\u629e\u753b\u9762\u3067\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u30b9\u30b3\u30fc\u30d7\u8a2d\u5b9a\u3059\u308b\u306e\u3067\u3059\u304c\u3001\u4eca\u56de\u306f\u300c<span style=\"color: #ff0000; font-weight: bold;\">Read all users&#8217; full profiles<\/span>\u300d\u3068\u300c<span style=\"color: #ff0000; font-weight: bold;\">Send mail as a user<\/span>\u300d\u306e2\u3064\u3092\u9078\u629e\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/li>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/MicrosoftGraphJavaScriptSDK_Sample_05.png\" alt=\"microsoftgraphjavascriptsdk_sample_05\" width=\"893\" height=\"822\" class=\"alignnone size-full wp-image-7742\" srcset=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/MicrosoftGraphJavaScriptSDK_Sample_05.png 893w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/MicrosoftGraphJavaScriptSDK_Sample_05-300x276.png 300w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/MicrosoftGraphJavaScriptSDK_Sample_05-768x707.png 768w\" sizes=\"auto, (max-width: 893px) 100vw, 893px\" \/><\/p>\n<li>\u30de\u30cb\u30d5\u30a7\u30b9\u30c8\u306e\u7de8\u96c6\u753b\u9762\u3067\u300c<span style=\"color: #ff0000; font-weight: bold;\">oauth2AllowImplicitFlow<\/span>\u300d\u306e\u5024\u3092\u300c<span style=\"color: #ff0000; font-weight: bold;\">true<\/span>\u300d\u306b\u8a2d\u5b9a\u5f8c\u3001\u300c<span style=\"color: #ff0000; font-weight: bold;\">\u4fdd\u5b58<\/span>\u300d\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u30de\u30cb\u30d5\u30a7\u30b9\u30c8\u3092\u4fdd\u5b58\u3057\u307e\u3059(\u6697\u9ed9\u7684\u306a\u4ed8\u4e0e\u30d5\u30ed\u30fc\u3092\u8a31\u53ef)\u3002<\/li>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/MicrosoftGraphJavaScriptSDK_Sample_06.png\" alt=\"microsoftgraphjavascriptsdk_sample_06\" width=\"566\" height=\"816\" class=\"alignnone size-full wp-image-7743\" srcset=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/MicrosoftGraphJavaScriptSDK_Sample_06.png 566w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/MicrosoftGraphJavaScriptSDK_Sample_06-208x300.png 208w\" sizes=\"auto, (max-width: 566px) 100vw, 566px\" \/>\n<\/ol>\n<p>\u4ee5\u4e0a\u3067\u3001Azure AD\u3078\u306e\u30a2\u30d7\u30ea\u306e\u767b\u9332\u4f5c\u696d\u306f\u7d42\u4e86\u3067\u3059\u3002<\/p>\n<h4 class=\"style4a\">Office 365 API\u3092\u547c\u3073\u51fa\u3059\u30a2\u30d7\u30ea\u306e\u4f5c\u6210\u3068\u52d5\u4f5c\u78ba\u8a8d<\/h4>\n<p>\u4e0b\u6e96\u5099\u304c\u7d42\u308f\u3063\u305f\u3089\u3001\u6b21\u306f\u3044\u3088\u3044\u3088\u30a2\u30d7\u30ea\u3092\u4f5c\u3063\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<ol>\n<li><a href=\"https:\/\/github.com\/microsoftgraph\/msgraph-sdk-javascript\" title=\"Microsoft Graph JavaScript SDK\" target=\"_blank\">GitHub<\/a>\u304b\u3089Microsoft Graph JavaScript SDK\u4e00\u5f0f\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002<\/li>\n<li>\u30c6\u30ad\u30b9\u30c8\u30a8\u30c7\u30a3\u30bf\u306b\u4e0b\u8a18\u30b3\u30fc\u30c9\u3092\u8cbc\u308a\u4ed8\u3051\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3 ID(\u4e0a\u8a18\u300cAzure AD\u3078\u306e\u30a2\u30d7\u30ea\u306e\u767b\u9332\u300d\u624b\u98063.)\u3084\u30e1\u30fc\u30eb\u60c5\u5831\u7b49\u3001\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u5909\u66f4\u3057\u3001Web\u30da\u30fc\u30b8\u3068\u3057\u3066\u4fdd\u5b58\u3057\u307e\u3059\u3002<\/li>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">&lt;!DOCTYPE html&gt;\r\n&lt;html&gt;\r\n  &lt;head&gt;\r\n    &lt;meta charset=&quot;UTF-8&quot;&gt;\r\n    &lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=Edge&quot;&gt;\r\n    &lt;title&gt;Microsoft Graph JavaScript SDK Sample&lt;\/title&gt;\r\n    &lt;script src=&quot;https:\/\/ajax.aspnetcdn.com\/ajax\/jquery\/jquery-3.1.1.min.js&quot;&gt;&lt;\/script&gt;\r\n    &lt;script src=&quot;.\/lib\/graph-js-sdk-web.js&quot;&gt;&lt;\/script&gt;\r\n    &lt;script&gt;\r\n      var access_token;\r\n      var client;\r\n      var client_id = '(app id)'; \/\/\u30af\u30e9\u30a4\u30a2\u30f3\u30c8 ID(\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3 ID) \u203b\u8981\u5909\u66f4\r\n      var resource_uri = 'https:\/\/graph.microsoft.com\/';\r\n      var url_auth = 'https:\/\/login.microsoftonline.com\/common\/oauth2\/authorize' +\r\n                     '?response_type=token' +\r\n                     '&amp;client_id=' + client_id +\r\n                     '&amp;resource=' + encodeURIComponent(resource_uri) +\r\n                     '&amp;redirect_uri=' + encodeURIComponent(location.protocol + &quot;\/\/&quot; + location.host + location.pathname);\r\n      \r\n      \/\/\u30e1\u30fc\u30eb\u60c5\u5831 \u203b\u8981\u5909\u66f4\r\n      var mail_subject = '\u30c6\u30b9\u30c8\u30e1\u30fc\u30eb'; \/\/\u4ef6\u540d\r\n      var mail_to_name = '\u30c6\u30b9\u30c8\u82b1\u5b50\u69d8'; \/\/\u5b9b\u5148\u540d\r\n      var mail_to_address = '(mail address)'; \/\/\u5b9b\u5148\u30a2\u30c9\u30ec\u30b9\r\n      var mail_body = &quot;\u3044\u3064\u3082\u5927\u5909\u304a\u4e16\u8a71\u306b\u306a\u3063\u3066\u304a\u308a\u307e\u3059\u3002\\n\u30c6\u30b9\u30c8\u30e1\u30fc\u30eb\u3092\u9001\u4fe1\u3057\u307e\u3059\u3002&quot;; \/\/\u30e1\u30fc\u30eb\u672c\u6587\r\n      \r\n      $(function(){\r\n        \/\/access_token\u306e\u53d6\u5f97\r\n        if(location.hash){\r\n          var hashary = location.hash.substr(1).split('&amp;');\r\n          $.each(hashary,function(i, v){\r\n            var ary = v.split('=');\r\n            if(ary&#x5B;0] == 'access_token'){\r\n              access_token = ary&#x5B;1];\r\n              $('#exec, #mail').prop('disabled', false);\r\n              \/\/SDK\u521d\u671f\u5316\r\n              client = MicrosoftGraph.init({\r\n                authProvider: (done) =&gt; {\r\n                  done(null, access_token);\r\n                }\r\n              });\r\n              return false;\r\n            }\r\n          });\r\n        }\r\n        \r\n        $('#login').click(function(){\r\n          location.href = url_auth;\r\n        });\r\n        \r\n        \/\/API\u547c\u3073\u51fa\u3057\r\n        $('#exec').click(function(){\r\n          client.api('\/me').select('displayName').get((err, res) =&gt; {\r\n            if(err){\r\n              console.log(err);\r\n              return;\r\n            }\r\n            \/\/console.log(res); \/\/\u78ba\u8a8d\u7528\r\n            alert(res.displayName);\r\n          });\r\n        });\r\n        \r\n        \/\/\u30e1\u30fc\u30eb\u9001\u4fe1\r\n        $('#mail').click(function(){\r\n          \/\/\u30e1\u30c3\u30bb\u30fc\u30b8\u4f5c\u6210\r\n          const mail = {\r\n            subject: mail_subject,\r\n            toRecipients: &#x5B;{\r\n              emailAddress: {\r\n                name: mail_to_name,\r\n                address: mail_to_address\r\n              }\r\n            }],\r\n            body: {\r\n              content: mail_body,\r\n              contentType: 'Text'\r\n            }\r\n          }\r\n          \r\n          \/\/\u30e1\u30fc\u30eb\u9001\u4fe1\r\n          client.api('\/me\/sendMail').post({message: mail}, (err, res) =&gt; {\r\n            if(err){\r\n              console.log(err);\r\n              return;\r\n            }\r\n            alert('\u30e1\u30fc\u30eb\u3092\u9001\u4fe1\u3057\u307e\u3057\u305f\u3002');\r\n          });\r\n        });\r\n        \r\n      });\r\n    &lt;\/script&gt;\r\n  &lt;\/head&gt;\r\n  &lt;body&gt;\r\n    &lt;div id=&quot;contents&quot;&gt;\r\n      &lt;button id=&quot;login&quot;&gt;Login&lt;\/button&gt;\r\n      &lt;button id=&quot;exec&quot; disabled=&quot;disabled&quot;&gt;Show DisplayName&lt;\/button&gt;\r\n      &lt;button id=&quot;mail&quot; disabled=&quot;disabled&quot;&gt;Send Mail&lt;\/button&gt;\r\n    &lt;\/div&gt;\r\n  &lt;\/body&gt;\r\n&lt;\/html&gt;<\/pre>\n<li>\u30b3\u30fc\u30c9\u3092\u898b\u308c\u3070\u5206\u304b\u308b\u901a\u308a\u3001\u624b\u98061.\u3067\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305fSDK\u306f\u3001\u4e0b\u8a18\u306e\u3088\u3046\u306a\u5f62\u3067\u8aad\u307f\u8fbc\u3093\u3067\u3044\u307e\u3059\u3002<\/li>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">&lt;script src=&quot;.\/lib\/graph-js-sdk-web.js&quot;&gt;&lt;\/script&gt;<\/pre>\n<li>\u624b\u98062.\u3067\u4fdd\u5b58\u3057\u305fWeb\u30da\u30fc\u30b8(https:\/\/localhost\/msgraph-sdk-js\/index.html)\u3092\u30d6\u30e9\u30a6\u30b6\u30fc\u3067\u958b\u304d\u3001\u300c<span style=\"color: #ff0000; font-weight: bold;\">Login<\/span>\u300d\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<\/li>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/MicrosoftGraphJavaScriptSDK_Sample_07.png\" alt=\"microsoftgraphjavascriptsdk_sample_07\" width=\"350\" height=\"88\" class=\"alignnone size-full wp-image-7744\" srcset=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/MicrosoftGraphJavaScriptSDK_Sample_07.png 350w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/MicrosoftGraphJavaScriptSDK_Sample_07-300x75.png 300w\" sizes=\"auto, (max-width: 350px) 100vw, 350px\" \/><\/p>\n<li>\u30b3\u30f3\u30bb\u30f3\u30c8\u753b\u9762\u304c\u8868\u793a\u3055\u308c\u308b\u306e\u3067\u3001\u5185\u5bb9\u3092\u78ba\u8a8d\u5f8c\u300c<span style=\"color: #ff0000; font-weight: bold;\">\u627f\u8afe<\/span>\u300d\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\u3002<\/li>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/MicrosoftGraphJavaScriptSDK_Sample_08.png\" alt=\"microsoftgraphjavascriptsdk_sample_08\" width=\"639\" height=\"528\" class=\"alignnone size-full wp-image-7745\" srcset=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/MicrosoftGraphJavaScriptSDK_Sample_08.png 639w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/MicrosoftGraphJavaScriptSDK_Sample_08-300x248.png 300w\" sizes=\"auto, (max-width: 639px) 100vw, 639px\" \/><\/p>\n<li>\u7121\u4e8b\u306b\u8a8d\u8a3c\u3067\u304d\u308b\u3068\u3001\u30a2\u30af\u30bb\u30b9\u30c8\u30fc\u30af\u30f3\u304c\u30cf\u30c3\u30b7\u30e5\u5024\u3068\u3057\u3066\u8fd4\u3063\u3066\u304f\u308b\u306e\u3067\u3001\u3053\u3053\u3067\u3088\u3046\u3084\u304fSDK\u3092\u521d\u671f\u5316\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/li>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">client = MicrosoftGraph.init({\r\n  authProvider: (done) =&gt; {\r\n    done(null, access_token);\r\n  }\r\n});<\/pre>\n<li>\u3053\u3053\u307e\u3067\u6765\u305f\u3089\u3042\u3068\u306f\u7c21\u5358\u3001\u4e0b\u8a18\u30b3\u30fc\u30c9\u306e\u3088\u3046\u306bAPI\u3092\u547c\u3073\u51fa\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/li>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">client.api('\/me').select('displayName').get((err, res) =&gt; {\r\n  if(err){\r\n    console.log(err);\r\n    return;\r\n  }\r\n  alert(res.displayName);\r\n});<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/MicrosoftGraphJavaScriptSDK_Sample_09.png\" alt=\"microsoftgraphjavascriptsdk_sample_09\" width=\"405\" height=\"262\" class=\"alignnone size-full wp-image-7746\" srcset=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/MicrosoftGraphJavaScriptSDK_Sample_09.png 405w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/MicrosoftGraphJavaScriptSDK_Sample_09-300x194.png 300w\" sizes=\"auto, (max-width: 405px) 100vw, 405px\" \/><\/p>\n<li>Outlook \u30e1\u30fc\u30eb REST API\u306eSendMail\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3063\u3066\u3001\u30e1\u30fc\u30eb\u9001\u4fe1\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/li>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/MicrosoftGraphJavaScriptSDK_Sample_10.png\" alt=\"microsoftgraphjavascriptsdk_sample_10\" width=\"426\" height=\"260\" class=\"alignnone size-full wp-image-7747\" srcset=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/MicrosoftGraphJavaScriptSDK_Sample_10.png 426w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/MicrosoftGraphJavaScriptSDK_Sample_10-300x183.png 300w\" sizes=\"auto, (max-width: 426px) 100vw, 426px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/MicrosoftGraphJavaScriptSDK_Sample_11.png\" alt=\"microsoftgraphjavascriptsdk_sample_11\" width=\"313\" height=\"232\" class=\"alignnone size-full wp-image-7748\" srcset=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/MicrosoftGraphJavaScriptSDK_Sample_11.png 313w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/MicrosoftGraphJavaScriptSDK_Sample_11-300x222.png 300w\" sizes=\"auto, (max-width: 313px) 100vw, 313px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/MicrosoftGraphJavaScriptSDK_Sample_12.png\" alt=\"microsoftgraphjavascriptsdk_sample_12\" width=\"1072\" height=\"514\" class=\"alignnone size-full wp-image-7749\" srcset=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/MicrosoftGraphJavaScriptSDK_Sample_12.png 1072w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/MicrosoftGraphJavaScriptSDK_Sample_12-300x144.png 300w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/MicrosoftGraphJavaScriptSDK_Sample_12-768x368.png 768w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/MicrosoftGraphJavaScriptSDK_Sample_12-1024x491.png 1024w\" sizes=\"auto, (max-width: 1072px) 100vw, 1072px\" \/>\n<\/ol>\n<p>\u4ee5\u4e0a\u306e\u3088\u3046\u306b\u3001SDK\u3092\u4f7f\u3046\u3068\u77ed\u3044\u30b3\u30fc\u30c9\u3067\u7c21\u5358\u306bAPI\u3092\u547c\u3073\u51fa\u3059\u3053\u3068\u304c\u3067\u304d\u308b\u306e\u3067\u3001\u975e\u5e38\u306b\u4fbf\u5229\u3067\u3059\u3002<br \/>\n\u8a73\u3057\u3044\u4f7f\u3044\u65b9\u3084\u3001\u305d\u306e\u4ed6\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u306f<a href=\"https:\/\/github.com\/microsoftgraph\/msgraph-sdk-javascript\" title=\"Microsoft Graph JavaScript SDK\" target=\"_blank\">GitHub<\/a>\u306b\u8f09\u3063\u3066\u3044\u308b\u306e\u3067\u3001\u8208\u5473\u304c\u3042\u308b\u65b9\u306f\u305d\u3061\u3089\u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\u3002<\/p>\n<div id=\"single_banner_area2\" class=\"clearfix one_banner\">\n<div class=\"single_banner single_banner_left\">\n<script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script>\r\n<!-- \u8a18\u4e8b\u4e2d(\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u5e83\u544a\u30e6\u30cb\u30c3\u30c8) -->\r\n<ins class=\"adsbygoogle\"\r\n     style=\"display:block\"\r\n     data-ad-client=\"ca-pub-7306936664602087\"\r\n     data-ad-slot=\"5429724765\"\r\n     data-ad-format=\"auto\"\r\n     data-full-width-responsive=\"true\"><\/ins>\r\n<script>\r\n     (adsbygoogle = window.adsbygoogle || []).push({});\r\n<\/script>\n<\/div>\n<div class=\"single_banner single_banner_right\">\n<a href=\"\" target=\"_blank\"><img decoding=\"async\" src=\"\" alt=\"\" title=\"\" \/><\/a>\n<\/div>\n<\/div>\n\n<p>\u3053\u308c\u3067\u300c<a href=\"http:\/\/www.adventar.org\/calendars\/1396\" title=\"Office 365 Advent Calendar 2016 - Adventar\" target=\"_blank\">Office 365 Advent Calendar 2016<\/a>\u300d2\u65e5\u76ee\u306e\u8a18\u4e8b\u306f\u7d42\u4e86\u3067\u3059\u3002<br \/>\n\u660e\u65e5\u306f<a href=\"http:\/\/naoki0311.hateblo.jp\/entry\/2016\/12\/01\/102002\" title=\"Microsoft Teams\u3092\u4e00\u90e8\u3067\u793e\u5185\u5c55\u958b\u3057\u3066\u611f\u3058\u305f\u4e8b - naoki0311's diary\" target=\"_blank\">1\u65e5\u76ee<\/a>\u3068\u540c\u3058\u304f\u3001<a href=\"https:\/\/twitter.com\/naoki0311\" title=\"naoki0311(@naoki0311)\u3055\u3093\" target=\"_blank\">@naoki0311<\/a>\u6c0f\u306b\u3088\u308bOffice 365\u52c9\u5f37\u4f1a\u306e\u8a18\u4e8b\u3068\u306a\u308b\u4e88\u5b9a\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Office 365 Advent Calendar 2016 \u4eca\u5e74\u3082\u30a2\u30c9\u30d9\u30f3\u30c8\u30ab\u30ec\u30f3\u30c0\u30fc(Advent calendar)\u306e\u5b63\u7bc0\u304c\u3084\u3063\u3066\u307e\u3044\u308a\u307e\u3057\u305f\u3002 Office Development MVP\u3068\u3057\u3066\u3001\u4eca\u5e74\u306f\u300cOff [&hellip;]","protected":false},"author":1,"featured_media":7118,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"[Microsoft Graph JavaScript SDK\u3092\u4f7f\u3063\u3066Office 365 API\u3092\u7c21\u5358\u306b\u547c\u3073\u51fa\u3059\u65b9\u6cd5]","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[4,112],"tags":[],"class_list":["post-7734","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-office","category-office365"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/eyecatch-Office365.png","jetpack_shortlink":"https:\/\/wp.me\/p4UZZr-20K","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/7734","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7734"}],"version-history":[{"count":2,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/7734\/revisions"}],"predecessor-version":[{"id":7750,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/7734\/revisions\/7750"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/media\/7118"}],"wp:attachment":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7734"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7734"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7734"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}