You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
New-PnPMicrosoft365Group Cmdlet fails in the new PreRelease with -ErrorAction = "Stop"
Expected behavior
A new Microsoft 365 Group is created
Actual behavior
An Error is thrown
Looking at the codebase, the Error gets thrown when it first checks, if a Microsoft 365 Group with the same alias exists (because none is found, which is to be excepted):
Reporting an Issue or Missing Feature
New-PnPMicrosoft365Group Cmdlet fails in the new PreRelease with -ErrorAction = "Stop"
Expected behavior
A new Microsoft 365 Group is created
Actual behavior
An Error is thrown
Looking at the codebase, the Error gets thrown when it first checks, if a Microsoft 365 Group with the same alias exists (because none is found, which is to be excepted):
powershell/src/Commands/Microsoft365Groups/NewMicrosoft365Group.cs
Line 86 in 5dad6d2
powershell/src/Commands/Utilities/Microsoft365GroupsUtility.cs
Line 118 in 5dad6d2
I believe the error thrown when no teams is found should be suppressed, as we actually check for its non-existance, and not the oposite:
powershell/src/Commands/Microsoft365Groups/NewMicrosoft365Group.cs
Line 86 in 5dad6d2
The Error is thrown due to the changes made to the Error Handling Behaviour: #2288 (comment)
Steps to reproduce behavior
What is the version of the Cmdlet module you are running?
1.11.74
Which operating system/environment are you running PnP PowerShell on?
The text was updated successfully, but these errors were encountered: