rubrikinc / polaris-o365-powershell

PowerShell commands for managing Polaris M365 protection
MIT License
7 stars 13 forks source link

Bug Fix - Get-PolarisO365Users and Get-PolarisO365User #13

Closed drew-russell closed 4 years ago

drew-russell commented 4 years ago

Description

This PR removes the following fields from the GQL queries for Get-PolarisO365Users and Get-PolarisO365User:

authorizedOperations {
    id
    operations
    __typename
}
childConnection(filter: []) {
    nodes {
        id
        name
        objectType
    }
}

Related Issue

Error message when running the two cmdlets (before fix).

powershell-master/PolarisO365.ps1:537
Line |
 537 |  … $response = Invoke-RestMethod -Method POST -Uri $endpoint -Body $($pa …
     |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | {"errors":[{"message":"no \"data\" or \"errors\" in response from origin"}]}

Motivation and Context

How Has This Been Tested?

Types of changes

What types of changes does your code introduce? Put an x in all the boxes that apply: