{"id":2704,"date":"2022-11-03T16:13:45","date_gmt":"2022-11-03T16:13:45","guid":{"rendered":"https:\/\/modern-workplace.uk\/?p=2704"},"modified":"2022-11-03T16:17:03","modified_gmt":"2022-11-03T16:17:03","slug":"teams-virtual-sbc-closing-azure-network-ports-warnings-for-azureloadbalancer-and-virtualnetwork-2-2-2-2-3-2-3-2-2-2-2-2-3-2-2-3-2-3-3-2-2-2-2","status":"publish","type":"post","link":"https:\/\/modern-workplace.uk\/?p=2704","title":{"rendered":"Azure Active Directory Conditional Access Policies &#8211; Get-AzureADMSConditionalAccessPolicy : Error converting value &#8220;linux&#8221; to type"},"content":{"rendered":"\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<p class=\"has-medium-font-size\">If you are trying to run the Get-AzureADMSConditionalAccessPolicy to list Azure Active Directory Conditional Access (CA) policies, you could get the following error:<\/p>\n\n\n\n<p class=\"has-vivid-red-color has-text-color\"><em>Get-AzureADMSConditionalAccessPolicy : Error converting value &#8220;linux&#8221; to type<br>&#8216;Microsoft.Open.MSGraph.Model.ConditionalAccessDevicePlatforms&#8217;. Path<br>&#8216;value[2].conditions.platforms.includePlatforms[0]&#8217;, line 1, position 2708.<br>At line:1 char:1<\/em><\/p>\n\n\n\n<ul class=\"has-vivid-red-color has-text-color wp-block-list\"><li><em>Get-AzureADMSConditionalAccessPolicy<\/em><\/li><li><em>CategoryInfo : NotSpecified: (:) [Get-AzureADMSConditionalAccessPolicy], ApiException<\/em><\/li><li><em>FullyQualifiedErrorId : Microsoft.Open.MSGraphV10.Client.ApiException,Microsoft.Open.MSGraphV10.PowerShell.GetAz<br>ureADMSConditionalAccessPolicy<\/em><\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/modern-workplace.uk\/wp-content\/uploads\/2022\/11\/image-1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"839\" height=\"146\" src=\"https:\/\/modern-workplace.uk\/wp-content\/uploads\/2022\/11\/image-1.png\" alt=\"\" class=\"wp-image-2706\" srcset=\"https:\/\/modern-workplace.uk\/wp-content\/uploads\/2022\/11\/image-1.png 839w, https:\/\/modern-workplace.uk\/wp-content\/uploads\/2022\/11\/image-1-300x52.png 300w, https:\/\/modern-workplace.uk\/wp-content\/uploads\/2022\/11\/image-1-768x134.png 768w\" sizes=\"auto, (max-width: 839px) 100vw, 839px\" \/><\/a><\/figure>\n\n\n\n<p>The error is connected to one of your CA policies containing a condition that includes Linux as a platform (as in the following screenshot)<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/modern-workplace.uk\/wp-content\/uploads\/2022\/11\/image.png\"><img loading=\"lazy\" decoding=\"async\" width=\"222\" height=\"430\" src=\"https:\/\/modern-workplace.uk\/wp-content\/uploads\/2022\/11\/image.png\" alt=\"\" class=\"wp-image-2705\" srcset=\"https:\/\/modern-workplace.uk\/wp-content\/uploads\/2022\/11\/image.png 222w, https:\/\/modern-workplace.uk\/wp-content\/uploads\/2022\/11\/image-155x300.png 155w\" sizes=\"auto, (max-width: 222px) 100vw, 222px\" \/><\/a><\/figure>\n\n\n\n<p>Microsoft has no plan to fix it, because Azure AD PowerShell is planned for deprecation (<a rel=\"noreferrer noopener\" href=\"https:\/\/learn.microsoft.com\/en-us\/powershell\/module\/azuread\/?view=azureadps-2.0\" data-type=\"URL\" data-id=\"https:\/\/learn.microsoft.com\/en-us\/powershell\/module\/azuread\/?view=azureadps-2.0\" target=\"_blank\">AzureAD<\/a>). If you need a detailed report of your Conditional Access policies, I suggest the following script (that uses Graph PowerShell Module)<\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/Donovand4\/ConditionalAccessPolicyReport\" target=\"_blank\" rel=\"noreferrer noopener\">Donovand4\/ConditionalAccessPolicyReport: PowerShell Script used to create a report for Azure AD Conditional Access Policies. (github.com)<\/a> <\/p>\n","protected":false},"excerpt":{"rendered":"<p>With Azure AD PowerShell is planned for deprecation more and more scripts will not be able to run properly.<br \/>\nAs in this case &#8220;Error converting value &#8220;linux&#8221; to type&#8221; the solution is to use Graph PowerShell Module<\/p>\n","protected":false},"author":1,"featured_media":2706,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_sitemap_exclude":false,"_sitemap_priority":"","_sitemap_frequency":"","twitterCardType":"","cardImageID":0,"cardImage":"","cardTitle":"","cardDesc":"","cardImageAlt":"","cardPlayer":"","cardPlayerWidth":0,"cardPlayerHeight":0,"cardPlayerStream":"","cardPlayerCodec":"","footnotes":""},"categories":[806,753,752,757],"tags":[762,793,809,759],"class_list":["post-2704","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-806","category-microsoft365","category-microsoft-teams","category-office-365","tag-microsoftteams","tag-azure","tag-conditional-access","tag-microsoft-365"],"_links":{"self":[{"href":"https:\/\/modern-workplace.uk\/index.php?rest_route=\/wp\/v2\/posts\/2704","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/modern-workplace.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/modern-workplace.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/modern-workplace.uk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/modern-workplace.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2704"}],"version-history":[{"count":2,"href":"https:\/\/modern-workplace.uk\/index.php?rest_route=\/wp\/v2\/posts\/2704\/revisions"}],"predecessor-version":[{"id":2708,"href":"https:\/\/modern-workplace.uk\/index.php?rest_route=\/wp\/v2\/posts\/2704\/revisions\/2708"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/modern-workplace.uk\/index.php?rest_route=\/wp\/v2\/media\/2706"}],"wp:attachment":[{"href":"https:\/\/modern-workplace.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2704"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/modern-workplace.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2704"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/modern-workplace.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2704"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}