microsoftgraph / msgraph-sdk-powershell

Powershell SDK for Microsoft Graph
https://www.powershellgallery.com/packages/Microsoft.Graph
Other
712 stars 172 forks source link

Get-MgReportEmailActivityUserDetail : A parameter cannot be found that matches parameter name 'UserId'. #3022

Open KnutSander opened 1 week ago

KnutSander commented 1 week ago

Describe the bug

I am trying to use Get-MgReportEmailActivityUserDetail to get information only about a certain user, using the UserId parameter in the inputObject, but I am recieving the following error.

Get-MgReportEmailActivityUserDetail: 
Line |
   7 |  Get-MgReportEmailActivityUserDetail @inputObject -OutFile 'temp.csv'
     |                                      ~~~~~~~~~~~~
     | A parameter cannot be found that matches parameter name 'UserId'.

The input object looks like this:

$inputObject = @{
    Period = "D90"
    UserId = "name@email.com" 
}

I have tried several other parameters as well, but they also produce the same error.

Expected behavior

UserId is defined as one of the parameters that can be passed to the function in the documentation, so the expected behaviour is that I am allowed to pass it to the function and that it returns a result.

How to reproduce

  1. Connect to Microsoft Graph with at least "Reports.Read.All" privileges.
  2. Create an input object as described above
  3. Run the Get-MgReportEmailActivityUserDetail command with the inputObject and an OutFile.

SDK Version

2.22.0

Latest version known to work for scenario above?

No response

Known Workarounds

No response

Debug output

Click to expand log ``` ```

Configuration

Name Value
PSVersion 7.4.6
PSEdition Core
GitCommitId 7.4.6
OS Microsoft Windows 10.0.26100
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0

Other information

No response