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

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

Closed
KnutSander opened this issue Nov 7, 2024 · 2 comments

Comments

@KnutSander
Copy link

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 = "[email protected]" 
}

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 ```
</details>


### 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_
@KnutSander KnutSander added status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience labels Nov 7, 2024
@timayabi2020
Copy link
Contributor

@KnutSander thank you for logging this issue. Based on the Api reference here https://learn.microsoft.com/en-us/graph/api/reportroot-getemailactivityuserdetail?view=graph-rest-1.0&tabs=http, the property UserId is not valid for that path. i.e. /reports/getEmailActivityUserDetail(date={date_value}). Therefore, during generation of the cmdlet, the parameter will not be availed to the user. However, I will advise that you raise an issue here https://developer.microsoft.com/en-us/graph/support so that the API owner can respond to it.

@timayabi2020 timayabi2020 added Service issue status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close and removed status:waiting-for-triage An issue that is yet to be reviewed or assigned labels Nov 26, 2024
@KnutSander
Copy link
Author

Thanks, I'll try that (Y)

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs: Attention 👋 and removed status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close labels Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants