Get-AzureADMSConditionalAccessPolicy command throwing error.

Khushboo Kumari 112 Reputation points
2023-06-13T15:40:08.0266667+00:00

Hi,

I got the error as attached image during executing the executing the command Get-AzureADMSConditionalAccessPolicy.User's image

"error.png

and when I searched for the solution, I found that this issue is resolved by removing the Device Platform Linux (Preview) condition from the CA policy. but I don't want to remove .So my, concern here is how to export on this case. Is there any other PowerShell command to get all the conditional access policy? And I don't want to use graph API. Please let me know to how to resolve this issue.

Thanks!

Microsoft Security | Intune | Security
Microsoft Security | Microsoft Entra | Microsoft Entra ID
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Vasil Michev 123.6K Reputation points MVP Volunteer Moderator
    2023-06-13T16:09:50.05+00:00

    The Azure AD module is on a deprecation path, it does not receive any updates and thus new features (such as support for new CA controls) are not supported. Instead, use the Graph SDK for PowerShell: https://learn.microsoft.com/en-us/powershell/microsoftgraph/get-started?view=graph-powershell-1.0

    In particular, you can use the Get-MgIdentityConditionalAccessPolicy cmdlet. Even with said module, some properties might be unsupported, or only available under the /beta endpoint (use Select-MgProfile beta).

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.