Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EntraID Conditional Access Policy PATCH/POST with Invoke-MgGraphRequest #5306

Open
FJanneau opened this issue Oct 31, 2024 · 0 comments
Open

Comments

@FJanneau
Copy link

Hello,

In the module MSFT_AADConditionalAccessPolicy, the cmdlet Invoke-MgGraphRequest is newly used to create or update a conditional access policy.

Line 1694: Invoke-MgGraphRequest -Method POST -Uri 'https://graph.microsoft.com/beta/identity/conditionalAccess/policies' -Body $NewParameters

On my side, when I use this command I always need to convert the Body to a JSON text format like this:

Invoke-MgGraphRequest -Method POST -Uri 'https://graph.microsoft.com/beta/identity/conditionalAccess/policies' -Body ($NewParameters | ConvertTo-Json -Depth 10)

If I don't, it always fails with a schema error.

Then my question is: are you sure the Body parameter can be a HashTable ?

Thanks for your attention !
Fabrice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant