azure-activedirectory-powershell icon indicating copy to clipboard operation
azure-activedirectory-powershell copied to clipboard

Get-AzureADMSConditionalAccessPolicy fails when any policy has Linux selected as a device platform.

Open ThoughtContagion opened this issue 3 years ago • 1 comments

As the title states, if a tenant chooses Linux as a platform under any Conditional Access Policy, the commands to get policies throws a nasty error.

Get-AzureADMSConditionalAccessPolicy
Get-AzureADMSConditionalAccessPolicy : Error converting value "linux" to type 'Microsoft.Open.MSGraph.Model.ConditionalAccessDevicePlatforms'. Path
'value[5].conditions.platforms.includePlatforms[2]', line 1, position 5853.
At line:1 char:1
+ Get-AzureADMSConditionalAccessPolicy
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Get-AzureADMSConditionalAccessPolicy], ApiException
    + FullyQualifiedErrorId : Microsoft.Open.MSGraphBeta.Client.ApiException,Microsoft.Open.MSGraphBeta.PowerShell.GetAzureADMSConditionalAccessPolicy

I realize this next bit is beyond the scope of this repo, but additionally the Microsoft Graph module doesn't throw an error, it just omits the policy in it's entirety. Not helpful for admins or auditors looking to programmatically pull the policies and details.

ThoughtContagion avatar Feb 08 '22 19:02 ThoughtContagion

This issue still persists, and makes generating a shareable catalogue/document of conditional access policies more painful than it needs to be. Please resolve!

asthalon avatar Sep 21 '22 15:09 asthalon