Skip to content

Feature Request: Pipeline Input #214

Open

Description

This module should support pipeline input where possible.

Get-MgUser -UserId e5c3398d-6401-4dd6-bb87-6d3f95499aef | Get-MgUserLicenseDetail

Get-MgGroup -GroupId 0f764d03-afb6-45cd-a720-84708fc0d5dc | Get-MgGroupMember | Get-MgUser

AB#7446

Activity

  1. added this to the Backlog milestone on May 11, 2021
  2. mabster commented on Jun 14, 2022

    @mabster

    I'm sure the team has their own ideas on how this could work, but I feel like adding an alias property to the output of the commands would be a good solution.

    For example:

    Get-MgGroup | Add-Member -MemberType AliasProperty -Name 'GroupId' -Value 'Id'
    

    ... so now the output has a GroupId property that's the same as Id.

    Now all that's necessary is to add the ValueFromPipelineByPropertyName attribute to the GroupId parameter on Get-MgGroupMember.

    I realise this is easier said than done, given that you're auto-generating the functions.

  3. peombwa commented on Oct 26, 2022

    @peombwa
    Member

    We are still waiting for the code generator (AutoREST.PowerShell) to support ValueFromPipelineByPropertyName for path parameters. This is being tracked in Azure/autorest.powershell#616

  4. modified the milestones: v2, v3 on Oct 27, 2022
  5. peombwa commented on Aug 23, 2023

    @peombwa
    Member

    A breaking change will occur because we will need to drop support for -InputObject parameter set to support piping by
    ValueFromPipelineByPropertyName - Get-MgUser (Microsoft.Graph.Users) | Microsoft Learn.

    AutoREST uses -InputObject to support piping via ValueFrompipeline, which doesn't work for MS Graph as explained at Azure/autorest.powershell#616. Adding support for piping via ValueFromPipelineByPropertyName has the effect of breaking customers who've taken a dependency on the publicly documented InputObject parameter.

  6. calebkiage commented on Feb 28, 2024

    @calebkiage
    Contributor

    Tim (@timayabi2020), is there a design for this feature put down anywhere?

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

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions