{"id":977,"date":"2021-08-27T21:13:38","date_gmt":"2021-08-27T12:13:38","guid":{"rendered":"https:\/\/blog.iotaker.jp\/?p=977"},"modified":"2021-09-03T10:09:17","modified_gmt":"2021-09-03T01:09:17","slug":"microsoft-graph-powershell%e3%82%92%e5%88%a9%e7%94%a8%e3%81%97%e3%81%a6%e3%83%a6%e3%83%bc%e3%82%b6%e3%83%bc%e3%81%b8office365%e3%83%a9%e3%82%a4%e3%82%bb%e3%83%b3%e3%82%b9%e3%82%92%e4%bb%98%e4%b8%8e","status":"publish","type":"post","link":"https:\/\/blog.iotaker.jp\/?p=977","title":{"rendered":"Microsoft Graph PowerShell\u3092\u5229\u7528\u3057\u3066\u30e6\u30fc\u30b6\u30fc\u3078Office365\u30e9\u30a4\u30bb\u30f3\u30b9\u3092\u4ed8\u4e0e\u3059\u308b"},"content":{"rendered":"\n<p>Office365\u3092\u7ba1\u7406\u3057\u3066\u3044\u308b\u3068\u30e6\u30fc\u30b6\u30fc\u306e\u4f5c\u6210\u30fb\u524a\u9664\u306f\u65e5\u3005\u884c\u3046\u3082\u306e\u3067\u3042\u308a\u3001\u5f93\u696d\u54e1\u306e\u51fa\u5165\u308a\u306e\u591a\u3044\u4f01\u696d\u306b\u304a\u3044\u3066\u306f\u81ea\u52d5\u5316\u306e\u4ed5\u7d44\u307f\u3092\u4f5c\u3063\u3066\u3044\u308b\u3053\u3068\u3082\u3042\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30e9\u30a4\u30bb\u30f3\u30b9\u306e\u4ed8\u4e0e\u306e\u81ea\u52d5\u5316\u306b\u3064\u3044\u3066\u306f\u4e3b\u306bPowerShell\u304b\u3089Azure AD\u3078\u63a5\u7d9a\u3057\u3001 Set-MsolUserLicense \u3084 Set-AzureADUserLicense \u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u4f8b\u304c\u3088\u304f\u53d6\u308a\u4e0a\u3052\u3089\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u5148\u65e5Microsoft\u306eTech Community\u306b\u65e2\u5b58\u306e\u30e9\u30a4\u30bb\u30f3\u30b9\u7ba1\u7406\u624b\u6cd5\u306e\u5ec3\u6b62\u3068\u65b0\u3057\u3044Graph API\u30d9\u30fc\u30b9\u3067\u306e\u30e9\u30a4\u30bb\u30f3\u30b9\u7ba1\u7406\u624b\u6cd5\u304c<a rel=\"noreferrer noopener\" href=\"https:\/\/techcommunity.microsoft.com\/t5\/azure-active-directory-identity\/migrate-your-apps-to-access-the-license-managements-apis-from\/ba-p\/2464366\" target=\"_blank\">\u767a\u8868\u3055\u308c\u307e\u3057\u305f<\/a>\u3002<br>\u65e2\u5b58\u306e\u30e9\u30a4\u30bb\u30f3\u30b9\u7ba1\u7406\u624b\u6cd5\u306f2022\/6\/30\u3067\u5ec3\u6b62\u3059\u308b\u3068\u306e\u8a18\u8f09\u304c\u3042\u308b\u305f\u3081\u3001\u305d\u308c\u307e\u3067\u306b\u30b9\u30af\u30ea\u30d7\u30c8\u306a\u3069\u306e\u5165\u308c\u66ff\u3048\u3092\u884c\u3046\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>Microsoft Graph API\u3092\u7528\u3044\u305f\u65b0\u3057\u3044\u30e9\u30a4\u30bb\u30f3\u30b9\u7ba1\u7406\u624b\u6cd5\u3067\u306e\u30e9\u30a4\u30bb\u30f3\u30b9\u306e\u4ed8\u4e0e\u30fb\u524a\u9664\u65b9\u6cd5\u3092\u78ba\u8a8d\u3057\u307e\u3057\u305f\u306e\u3067\u8a18\u8f09\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p><strong>\u203b2021\/08\/30\u8ffd\u8a18<\/strong><br>\u30c6\u30ca\u30f3\u30c8\u306b\u767b\u9332\u3055\u308c\u3066\u3044\u308b\u30e9\u30a4\u30bb\u30f3\u30b9\u4e00\u89a7\u3068\u30b5\u30fc\u30d3\u30b9\u60c5\u5831\u306e\u53d6\u5f97\u306b\u3064\u3044\u3066\u8ffd\u8a18<\/p>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\">Microsoft Graph PowerShell \u30e2\u30b8\u30e5\u30fc\u30eb\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h2>\n\n\n\n<p>\u307e\u305a\u3001Microsoft Graph\u3078\u63a5\u7d9a\u3059\u308b\u305f\u3081\u306ePowerShell\u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<br>\u7ba1\u7406\u8005\u6a29\u9650\u3067PowerShell\u3092\u5b9f\u884c\u3057\u3001\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u5b9f\u65bd\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Install-Module -Name Microsoft.Graph<\/code><\/pre>\n\n\n\n<p>PowerShell Gallery\u304b\u3089\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5b9f\u65bd\u3055\u308c\u307e\u3059\u3002<br>2021\/8\/27 \u6642\u70b9\u3067\u306f1.6.1\u304c\u6700\u65b0\u3067\u3057\u305f\u3002<\/p>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Microsoft Graph\u3078\u306e\u63a5\u7d9a\u3068\u30ea\u30bd\u30fc\u30b9\u3078\u306e\u30a2\u30af\u30bb\u30b9\u8a31\u53ef<\/h2>\n\n\n\n<p>\u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u305f\u3089\u4ee5\u4e0b\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3001Azure AD\u306e\u7ba1\u7406\u8005\u30a2\u30ab\u30a6\u30f3\u30c8\u3067\u30ed\u30b0\u30a4\u30f3\u3092\u5b9f\u65bd\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Connect-MgGraph -TenantID &lt;Azure AD Tenant ID&gt; -Scopes \"User.ReadWrite.All\"<\/code><\/pre>\n\n\n\n<p>TenantID\u306f\u5165\u529b\u3057\u306a\u304f\u3066\u3082\u30ed\u30b0\u30a4\u30f3\u30a2\u30ab\u30a6\u30f3\u30c8\u3067\u81ea\u52d5\u7684\u306bAzure AD\u30c6\u30ca\u30f3\u30c8\u3092\u9078\u629e\u3057\u3066\u304f\u308c\u307e\u3059\u304c\u3001\u4e00\u3064\u306e\u7aef\u672b\u3067\u8907\u6570\u306eAzure AD\u30c6\u30ca\u30f3\u30c8\u3078\u30ed\u30b0\u30a4\u30f3\u3057\u305f\u3044\u5834\u5408\u306f\u6307\u5b9a\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u63a5\u7d9a\u306e\u969b\u306b\u306fScopes\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u30ea\u30bd\u30fc\u30b9\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u7bc4\u56f2\u3068\u6a29\u9650\u3092\u6307\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<br>\u3053\u3053\u3067\u6307\u5b9a\u3057\u306a\u3044\u30ea\u30bd\u30fc\u30b9\u3078\u306f\u30b3\u30de\u30f3\u30c9\u306e\u5b9f\u884c\u304c\u62d2\u5426\u3055\u308c\u308b\u305f\u3081\u3001\u5fc5\u8981\u3067\u3042\u308c\u3070 Disconnect-MgGraph \u3067\u5207\u65ad\u3057\u3066\u304b\u3089\u518d\u5ea6\u9069\u5207\u306aScopes\u3092\u7528\u3044\u3066\u63a5\u7d9a\u3092\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u307e\u305f\u3001\u521d\u56de\u306fScopes\u3067\u6307\u5b9a\u3057\u305f\u6a29\u9650\u306b\u3064\u3044\u3066\u4ee5\u4e0b\u306e\u3088\u3046\u306bOAuth\u3067\u306e\u59d4\u4efb\u306e\u30a2\u30af\u30bb\u30b9\u8a31\u53ef\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<br>\u64cd\u4f5c\u3092\u5b9f\u65bd\u3059\u308b\u305f\u3081\u306b\u306f\u8a31\u53ef\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u4e0d\u5fc5\u8981\u306a\u6a29\u9650\u3092\u4ed8\u4e0e\u3059\u308b\u3068\u5371\u967a\u306a\u305f\u3081\u3001\u7ba1\u7406\u306b\u5fc5\u8981\u306a\u6700\u5c0f\u9650\u306e\u30ea\u30bd\u30fc\u30b9\u306e\u307f\u3092Scopes\u3067\u6307\u5b9a\u3059\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002<br>\u30e6\u30fc\u30b6\u30fc\u30e9\u30a4\u30bb\u30f3\u30b9\u306e\u7ba1\u7406\u306b\u5fc5\u8981\u306a\u30b9\u30b3\u30fc\u30d7\u306f User.ReadWrite.All \u306e\u307f\u3067\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"\/wp-content\/uploads\/2021\/08\/mggraph.png\"><img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/2021\/08\/mggraph.png\" alt=\"\" class=\"wp-image-980\" width=\"557\" height=\"550\" srcset=\"https:\/\/blog.iotaker.jp\/wp-content\/uploads\/2021\/08\/mggraph.png 512w, https:\/\/blog.iotaker.jp\/wp-content\/uploads\/2021\/08\/mggraph-300x296.png 300w\" sizes=\"auto, (max-width: 557px) 100vw, 557px\" \/><\/a><figcaption>\u30a2\u30af\u30bb\u30b9\u8a31\u53ef\u753b\u9762<\/figcaption><\/figure>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"\/wp-content\/uploads\/2021\/08\/mggraph-02.png\"><img loading=\"lazy\" decoding=\"async\" src=\"\/wp-content\/uploads\/2021\/08\/mggraph-02.png\" alt=\"\" class=\"wp-image-982\" width=\"807\" height=\"545\" srcset=\"https:\/\/blog.iotaker.jp\/wp-content\/uploads\/2021\/08\/mggraph-02.png 931w, https:\/\/blog.iotaker.jp\/wp-content\/uploads\/2021\/08\/mggraph-02-300x203.png 300w, https:\/\/blog.iotaker.jp\/wp-content\/uploads\/2021\/08\/mggraph-02-768x519.png 768w\" sizes=\"auto, (max-width: 807px) 100vw, 807px\" \/><\/a><figcaption>Azure AD Enterprise \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u767b\u9332\u3055\u308c\u305f PowerShell\u7528\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3068\u30a2\u30af\u30bb\u30b9\u8a31\u53ef\u30ea\u30b9\u30c8<\/figcaption><\/figure>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">\u30e9\u30a4\u30bb\u30f3\u30b9\u306e\u4ed8\u4e0e<\/h2>\n\n\n\n<p>Azure AD\u30c6\u30ca\u30f3\u30c8\u3078\u63a5\u7d9a\u3057\u305f\u3089\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3053\u3068\u3067\u30e9\u30a4\u30bb\u30f3\u30b9\u306e\u4ed8\u4e0e\u304c\u53ef\u80fd\u3067\u3059\u3002<br> \u7121\u52b9\u5316\u3057\u305f\u3044\u30b5\u30fc\u30d3\u30b9\u304c\u3042\u308b\u5834\u5408\u306f\u3001ServicePlanId \u3092\u914d\u5217\u3068\u3057\u3066 DisabledPlans \u306b\u8ffd\u52a0\u3057\u3066\u3042\u3052\u308b\u3053\u3068\u3067\u6307\u5b9a\u30b5\u30fc\u30d3\u30b9\u3092\u7121\u52b9\u5316\u3057\u305f\u72b6\u614b\u3067\u306e\u30e9\u30a4\u30bb\u30f3\u30b9\u4ed8\u4e0e\u3082\u53ef\u80fd\u3067\u3059\u3002<br>(Sway, Yammer, Bookings\u3042\u305f\u308a\u304c\u69cd\u7389\u306b\u3042\u3052\u3089\u308c\u304c\u3061) <\/p>\n\n\n\n<p>\u307e\u305f\u3001\u30e9\u30a4\u30bb\u30f3\u30b9\u304c\u65e2\u306b\u4ed8\u4e0e\u6e08\u307f\u306e\u30e6\u30fc\u30b6\u30fc\u306b\u5bfe\u3057\u3066\u4e00\u90e8\u30b5\u30fc\u30d3\u30b9\u306e\u6709\u52b9\u30fb\u7121\u52b9\u3092\u5909\u3048\u305f\u3044\u5834\u5408\u3082 DisabledPlans \u3092\u9069\u5207\u306b\u8a2d\u5b9a\u3057\u3066\u4e0a\u66f8\u304d\u5b9f\u884c\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$license = New-Object -TypeName Microsoft.Graph.PowerShell.Models.MicrosoftGraphAssignedLicense\n\n# \u2193\u4e0b\u8a18\u306f Microsoft365 E5 Developer License\n$license.SkuId = c42b9cae-ea4f-4ab7-9717-81576235ccac\n\n# Sway, Yammer Enterprise, Bookings \u3092\u7121\u52b9\u5316\n$disable = @(\"a23b959c-7ce8-4e57-9140-b90eb88a9e97\",\"7547a3fe-08ee-4ccb-b430-5077c5041653\",\"199a5c09-e0ca-4e37-8f7c-b05d533e1ea2\")\n$license.DisabledPlans = $disable\n\nSet-MgUserLicense -UserId &lt;UserPrincipalName&gt; -AddLicenses $license -RemoveLicenses @()<\/code><\/pre>\n\n\n\n<p>\u306a\u304a\u3001\u7279\u306b\u524a\u9664\u30e9\u30a4\u30bb\u30f3\u30b9\u304c\u306a\u3044\u5834\u5408\u3067\u3082 RemoveLicenses \u30aa\u30d7\u30b7\u30e7\u30f3\u306f\u5fc5\u9808\u3067\u3059\u3002<br>\u30e9\u30a4\u30bb\u30f3\u30b9\u3092\u524a\u9664\u3057\u306a\u3044\u5834\u5408\u306f\u7a7a\u306e\u914d\u5217\u3068\u3057\u3066 @() \u3092\u6e21\u3057\u3066\u3042\u3052\u307e\u3059\u3002<\/p>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">\u30e9\u30a4\u30bb\u30f3\u30b9\u306e\u524a\u9664<\/h2>\n\n\n\n<p>\u30e9\u30a4\u30bb\u30f3\u30b9\u3092\u524a\u9664\u3059\u308b\u969b\u306b\u306f\u7121\u52b9\u5316\u30b5\u30fc\u30d3\u30b9\u306e\u6307\u5b9a\u3084\u30ab\u30b9\u30bf\u30e0\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u751f\u6210\u305b\u305a\u306b\u76f4\u63a5\u30e9\u30a4\u30bb\u30f3\u30b9\u306eSkuId\u3092\u6307\u5b9a\u3059\u308b\u3060\u3051\u3067\u30e9\u30a4\u30bb\u30f3\u30b9\u304c\u524a\u9664\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3053\u3061\u3089\u3082\u8ffd\u52a0\u6642\u3068\u540c\u69d8\u3001\u8ffd\u52a0\u30e9\u30a4\u30bb\u30f3\u30b9\u304c\u306a\u3044\u5834\u5408\u3067\u3082 AddLicenses \u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u5fc5\u9808\u306a\u306e\u3067\u6c17\u3092\u4ed8\u3051\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Set-MgUserLicense -UserId &lt;UserPrincipalName&gt; -AddLicenses @() -RemoveLicenses c42b9cae-ea4f-4ab7-9717-81576235ccac<\/code><\/pre>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">\u30e9\u30a4\u30bb\u30f3\u30b9\u51e6\u7406\u306e\u81ea\u52d5\u5316<\/h2>\n\n\n\n<p>\u4e0a\u8a18\u307e\u3067\u3067\u7ba1\u7406\u8005\u30a2\u30ab\u30a6\u30f3\u30c8\u3068\u3057\u3066Azure AD\u306b\u63a5\u7d9a\u3057\u3001\u30e6\u30fc\u30b6\u30fc\u30e9\u30a4\u30bb\u30f3\u30b9\u3092\u4ed8\u4e0e\u3059\u308b\u624b\u6cd5\u3092\u8aac\u660e\u3057\u307e\u3057\u305f\u3002<br>\u3057\u304b\u3057\u3001\u5b9f\u969b\u306e\u81ea\u52d5\u5316\u306b\u304a\u3044\u3066MFA\u3082\u306a\u3057\u306bID\/\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u307f\u3067\u7ba1\u7406\u8005\u30a2\u30ab\u30a6\u30f3\u30c8\u306e\u8a8d\u8a3c\u3092\u884c\u3046\u3053\u3068\u306f\u5927\u5909\u5371\u967a\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u8a3c\u660e\u66f8\u3092\u7528\u3044\u305f\u7121\u4eba\u3067\u306e\u30ed\u30b0\u30a4\u30f3\u65b9\u6cd5\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u308b\u305f\u3081\u3001\u5b9f\u969b\u306e\u81ea\u52d5\u5316\u306e\u4ed5\u7d44\u307f\u306b\u304a\u3044\u3066\u306f\u305d\u3061\u3089\u3092\u5229\u7528\u3057\u3066Azure AD\u3078\u63a5\u7d9a\u3057\u30e9\u30a4\u30bb\u30f3\u30b9\u306e\u51e6\u7406\u3092\u5b9f\u65bd\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Connect-MgGraph -TenantID &lt;TenantID&gt; -AppID &lt;ApplicationID&gt; -CertificateThumbnailPrint &lt;CertificateThumbprint&gt;<\/code><\/pre>\n\n\n\n<p>\u8a3c\u660e\u66f8\u306e\u751f\u6210\u3084Azure Automation\u3067\u306e\u5b9f\u884c\u306b\u3064\u3044\u3066\u306f <a rel=\"noreferrer noopener\" href=\"https:\/\/blog.iotaker.jp\/?p=776\" target=\"_blank\">Exchange Online\u3078\u306e\u8a3c\u660e\u66f8\u8a8d\u8a3c<\/a> \u3068\u307b\u307c\u540c\u3058\u3067\u3059\u306e\u3067\u3001\u305d\u3061\u3089\u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">\u307e\u3068\u3081<\/h2>\n\n\n\n<p>Microsoft Graph PowerShell \u30e2\u30b8\u30e5\u30fc\u30eb\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u3067\u554f\u984c\u306a\u304f\u30e9\u30a4\u30bb\u30f3\u30b9\u306e\u4ed8\u4e0e\u3092\u5b9f\u65bd\u3067\u304d\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u307e\u3057\u305f\u3002<br>2022\/6\/30\u307e\u3067\u306b\u65e2\u5b58\u306e\u81ea\u52d5\u5316\u51e6\u7406\u3092\u898b\u76f4\u3057\u3001\u9069\u5207\u306a\u4ed5\u7d44\u307f\u3078\u5165\u308c\u66ff\u3048\u3092\u884c\u3044\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<p><s>\u3061\u306a\u307f\u306b\u79c1\u304c\u30b3\u30de\u30f3\u30c9\u3092\u6f01\u3063\u305f\u9650\u308a\u3067\u306f\u30c6\u30ca\u30f3\u30c8\u306b\u767b\u9332\u3055\u308c\u3066\u3044\u308b\u30e9\u30a4\u30bb\u30f3\u30b9\u30ea\u30b9\u30c8\u306e\u78ba\u8a8d\u30b3\u30de\u30f3\u30c9\u304c\u308f\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002<br>\u8a18\u8f09\u306e SkuId \u3084 ServicePlanId \u306b\u3064\u3044\u3066\u306f\u3059\u3067\u306b\u30e9\u30a4\u30bb\u30f3\u30b9\u4ed8\u4e0e\u6e08\u307f\u306e\u30e6\u30fc\u30b6\u30fc\u306b\u5bfe\u3057\u3066 Get-MgUserLicenseDetail \u3092\u7528\u3044\u3066\u78ba\u8a8d\u3057\u3066\u3044\u307e\u3059\u3002<\/s><\/p>\n\n\n\n<p><strong>\u203b2021\/8\/30\u8ffd\u8a18<\/strong><br><a rel=\"noreferrer noopener\" href=\"https:\/\/twitter.com\/micachi_net\/status\/1432139016481083395\" target=\"_blank\">@micachi_net<\/a> \u3055\u3093\u306b\u30c6\u30ca\u30f3\u30c8\u306b\u767b\u9332\u3055\u308c\u3066\u3044\u308b\u30e9\u30a4\u30bb\u30f3\u30b9\u306e\u53d6\u5f97\u306f\u300cGet-MgSubscribedSku\u300d\u3060\u3088\u3068\u6559\u3048\u3066\u3082\u3089\u3044\u307e\u3057\u305f\u3002<br>\u3053\u3061\u3089\u306e\u30b3\u30de\u30f3\u30c9\u306f &#8220;Directory.Read.All&#8221; \u306e\u6a29\u9650\u3067\u5b9f\u884c\u3067\u304d\u308b\u3053\u3068\u3092\u78ba\u8a8d\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Office365\u3092\u7ba1\u7406\u3057\u3066\u3044\u308b\u3068\u30e6\u30fc\u30b6\u30fc\u306e\u4f5c\u6210\u30fb\u524a\u9664\u306f\u65e5\u3005\u884c\u3046\u3082\u306e\u3067\u3042\u308a\u3001\u5f93\u696d\u54e1\u306e\u51fa\u5165\u308a\u306e\u591a\u3044\u4f01\u696d\u306b\u304a\u3044\u3066\u306f\u81ea\u52d5\u5316\u306e\u4ed5\u7d44\u307f\u3092\u4f5c\u3063\u3066\u3044\u308b\u3053\u3068\u3082\u3042\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u3002 \u30e9\u30a4\u30bb\u30f3\u30b9\u306e\u4ed8\u4e0e\u306e\u81ea\u52d5\u5316\u306b\u3064\u3044\u3066\u306f\u4e3b\u306bPowerShell [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,4,2],"tags":[38,6],"class_list":["post-977","post","type-post","status-publish","format-standard","hentry","category-azure","category-office365","category-tech","tag-graph","tag-powershell"],"_links":{"self":[{"href":"https:\/\/blog.iotaker.jp\/index.php?rest_route=\/wp\/v2\/posts\/977","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.iotaker.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.iotaker.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.iotaker.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.iotaker.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=977"}],"version-history":[{"count":21,"href":"https:\/\/blog.iotaker.jp\/index.php?rest_route=\/wp\/v2\/posts\/977\/revisions"}],"predecessor-version":[{"id":1004,"href":"https:\/\/blog.iotaker.jp\/index.php?rest_route=\/wp\/v2\/posts\/977\/revisions\/1004"}],"wp:attachment":[{"href":"https:\/\/blog.iotaker.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=977"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.iotaker.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=977"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.iotaker.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=977"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}