Forum Discussion

EntilZha's avatar
EntilZha
Iron Contributor
Jun 24, 2021
Solved

Variable in Graph Request Body (PowerShell)

Working off the following URL: https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fgraph%2Fapi%2Fpasswordauthenticationmethod-resetpassword%3Fview%3Dgraph-r...
  • EntilZha's avatar
    EntilZha
    Jun 24, 2021
    SOLUTION: I had to add " | ConvertTo-Json" at the end Request Body
    $PWCBody = @{
    newPassword = $password
    forceChangePasswordNextSignIn = $true
    } | ConvertTo-Json

Resources