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

New-MgTeam doesn't appear to return an Object #991

Closed
lrarbin opened this issue Dec 22, 2021 · 1 comment
Closed

New-MgTeam doesn't appear to return an Object #991

lrarbin opened this issue Dec 22, 2021 · 1 comment

Comments

@lrarbin
Copy link

lrarbin commented Dec 22, 2021

Hello,
I'm trying to use New-MgTeam to create a Team which is working fine, but the transaction doesn't appear to be returning an Object, so when scripting I can't process the new Team any further as there is no record of what was created.

$TeamParam = @{
    Owners = @(Get-MgUser -UserId $owner)
    DisplayName             = $GroupName
    Description             = $Description
    Visibility              = $AccessType
    Classification          = $Classification
    AdditionalProperties    = $AdditionalProperties
}
  Write-Verbose "Team - $($TeamParam.DisplayName)"

    $UnifiedGroup = New-MgTeam @TeamParam -Verbose
    Write-Host $UnifiedGroup # <<<<This returns no data

I'm using module version 1.9.1 and PowerShell 7.2.
Thanks
Laurence

@ghost ghost added the ToTriage label Dec 22, 2021
@peombwa
Copy link
Member

peombwa commented Jan 4, 2022

The API to create a team is non-committal (returns HTTP status code 202) and no response object is returned. Please see the workarounds mentioned in #897 (comment).

This will be fixed when we add support for long running operations.

Closing as duplicate of #897.

@peombwa peombwa closed this as completed Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants