Skip to content

Get-MgReportTeamUserActivityCount returning Edm type error #222

Closed

Description

@stvpwrs

Hello,

When trying to use the new 0.5.1 module and the Get-MgReportTeamUserActivityCount cmdlet I'm getting a type error.

If I run:

Connect-Graph

Get-MgReportTeamUserActivityCount -Period "7D"

I get the following error:

Get-MgReportTeamUserActivityUserCount : Expression of type 'Edm.Double' cannot be converted to type 'Edm.String'.
At line:1 char:1
+ Get-MgReportTeamUserActivityUserCount
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: ({ Period = 7D }:<>f__AnonymousType3`1) [Get-MgReportTea...tyUserCount_Get], Exception
    + FullyQualifiedErrorId : BadRequest,Microsoft.Graph.PowerShell.Cmdlets.GetMgReportTeamUserActivityUserCount_Get

None of the Teams report cmdlets appear to be working.

Activity

  1. darrelmiller commented on May 13, 2020

    @darrelmiller
    Contributor

    Yeah sorry about this. It's a known issue #151. We have a fix coming out in the next update which will be in a few weeks.

  2. stvpwrs commented on May 13, 2020

    @stvpwrs
    Author

    Darrel (@darrelmiller) so if I format the arguement correctly, I then get a different error which I assume is the cmdlet not expecting a csv as the result. I didn't see that covered in #151 should that be it's own issue?
    Get-MgReportTeamUserActivityCount -Period "'D7'"

    Welcome To Microsoft Graph!
    Get-MgReportTeamUserActivityCount : Expected '{' or '['. Was String: Report.
    At line:12 char:1
    + Get-MgReportTeamUserActivityCount -Period "'D7'"
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Get-MgReportTeamUserActivityCount_Get], ParserException
        + FullyQualifiedErrorId : Microsoft.Graph.PowerShell.Cmdlets.GetMgReportTeamUserActivityCount_Get
    
    
  3. peombwa commented on May 14, 2020

    @peombwa
    Member

    Steve Powers (@stvpwrs) the second issue is an issue with the code generator - it does not handle non JSON responses. This is covered in #182.

  4. TomasCrha commented on Jun 11, 2020

    @TomasCrha

    Hello, is there any update? I would really like to use Get-MgReportTeamUserActivityCount command but I am also struggling with the date format as mentioned above...
    Is there any hope this will be fixed/adjusted - or do you think you can advise how to input the date so the cmdlet will accept it?
    Many thanks,
    Tomas

  5. stvpwrs commented on Jun 15, 2020

    @stvpwrs
    Author

    Hello, is there any update? I would really like to use Get-MgReportTeamUserActivityCount command but I am also struggling with the date format as mentioned above...
    Is there any hope this will be fixed/adjusted - or do you think you can advise how to input the date so the cmdlet will accept it?
    Many thanks,
    Tomas

    TomasCrha, you can pass an argument to the cmdlet so that the resulting string is literally 'D7' for instance, but the cmdlet still cannot handle the csv return type. So this needs to have 2 bugs fixed.

    I ended up using Power BI and the Microsoft Graph report framework to get around this issue.

    Steve

  6. peombwa commented on Nov 11, 2020

    @peombwa
    Member

    Duplicate of #407. Downloading of reports is being tracked by #407.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions