SOLVED
Home

Powershell New-Team stops working

%3CLINGO-SUB%20id%3D%22lingo-sub-274317%22%20slang%3D%22en-US%22%3EPowershell%20New-Team%20stops%20working%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-274317%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20a%20problem%20with%20the%20powerhell%20CMDLet%20New-Team.%20A%20Few%20weeks%20(before%20getting%20win10%201809)%20my%20script%20works%20to%20create%20a%20new%20Team%20using%20powershell.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENow%20it%20doesn't%20work%20anymore.%3C%2FP%3E%3CP%3EAfter%20Connect-Microsoft-Teams%20my%20login%20is%20ok.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENew-Team%20-DisplayName%20%22ASDF%22%3CBR%20%2F%3ENew-Team%20%3A%20Error%20occurred%20while%20executing%3CBR%20%2F%3ECode%3A%20Request_BadRequest%3CBR%20%2F%3EMessage%3A%20A%20value%20without%20a%20type%20name%20was%20found%20and%20no%20expected%20type%20is%20available.%20When%20the%20model%20is%20specified%2C%20each%3CBR%20%2F%3Evalue%20in%20the%20payload%20must%20have%20a%20type%20which%20can%20be%20either%20specified%20in%20the%20payload%2C%20explicitly%20by%20the%20caller%20or%3CBR%20%2F%3Eimplicitly%20inferred%20from%20the%20parent%20value.%3CBR%20%2F%3EInnerError%3A%3CBR%20%2F%3ERequestId%3A%20d1dd522d-e8dc-44a5-a728-26e2be30088f%3CBR%20%2F%3EDateTimeStamp%3A%202018-10-17T06%3A41%3A12%3CBR%20%2F%3EHttpStatusCode%3A%20Request_BadRequest%3CBR%20%2F%3EIn%20Zeile%3A1%20Zeichen%3A1%3CBR%20%2F%3E%2B%20New-Team%20-DisplayName%20%22ASDF%22%3CBR%20%2F%3E%2B%20~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~%3CBR%20%2F%3E%2B%20CategoryInfo%20%3A%20NotSpecified%3A%20(%3A)%20%5BNew-Team%5D%2C%20ApiException%3CBR%20%2F%3E%2B%20FullyQualifiedErrorId%20%3A%20Microsoft.TeamsCmdlets.PowerShell.Custom.ErrorHandling.ApiException%2CMicrosoft.TeamsCmdle%3CBR%20%2F%3Ets.PowerShell.Custom.NewTeam%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPowershell%20Teams%20Modul%20is%20ver%200.93.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-274317%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPowerShell%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-276518%22%20slang%3D%22en-US%22%3ERe%3A%20Powershell%20New-Team%20stops%20working%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-276518%22%20slang%3D%22en-US%22%3EI%20think%20its%20because%20of%20PS%20session%20for%20Azure%20Function%20loading%20the%20old%20session%20with%20modules%20loaded%20in%20session%20of%20PS%20doesn't%20update%20the%20session%20of%20module%20functions%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-276517%22%20slang%3D%22en-US%22%3ERe%3A%20Powershell%20New-Team%20stops%20working%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-276517%22%20slang%3D%22en-US%22%3E%3CP%3EGood%20to%20hear.%20%3A)%3C%2Fimg%3E%20Nevertheless%20it%20would%20be%20interesting%20why%20this%20kind%20of%20behaviour%20happens%20in%20PowerShell%20Azure%20Functions.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-276513%22%20slang%3D%22en-US%22%3ERe%3A%20Powershell%20New-Team%20stops%20working%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-276513%22%20slang%3D%22en-US%22%3EThanks%20Carsten%20.%20I%20already%20done%20it%20and%20my%20luck%20is%20with%20me.%20Sorted%20%3A)%3C%2Fimg%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-276372%22%20slang%3D%22en-US%22%3ERe%3A%20Powershell%20New-Team%20stops%20working%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-276372%22%20slang%3D%22en-US%22%3E%3CP%3EDelete%20the%20olf%20Modules%20in%20the%20Azure%20function.%20I%20had%20the%20same%20trouble%20here%2C%20it%20looked%20like%20the%20new%20version%20was%20not%20gotten%20at%20all%20although%20I%20changed%20my%20Import-Module%20references%20in%20the%20function%20code.%20It%20seems%20that%20Azure%20functions%20do%20a%20lot%20of%20caching%20while%20executing.%20Even%20restarting%20it%20explicitely%20did%20not%20change%20the%20behaviour.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAfter%20I%20deleted%20the%20old%200.93%20module%20with%20Kudo%20it%20worked%20like%20a%20charm.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-276361%22%20slang%3D%22en-US%22%3ERe%3A%20Powershell%20New-Team%20stops%20working%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-276361%22%20slang%3D%22en-US%22%3E%3CP%3EProduction%20Environment%20running%20version%200.9.3%20error%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E20181022%2015%3A01%3A46.494%3BCreate-Team%3BError%3BSource%3AMicrosoft.TeamsCmdlets.PowerShell.Custom.Message%3AError%20occurred%20while%20executing%3CBR%20%2F%3ECode%3A%20Request_BadRequest%3CBR%20%2F%3EMessage%3A%20A%20value%20without%20a%20type%20name%20was%20found%20and%20no%20expected%20type%20is%20available.%20When%20the%20model%20is%20specified%2C%20each%20value%20in%20the%20payload%20must%20have%20a%20type%20which%20can%20be%20either%20specified%20in%20the%20payload%2C%20explicitly%20by%20the%20caller%20or%20implicitly%20inferred%20from%20the%20parent%20value.%3CBR%20%2F%3EInnerError%3A%3CBR%20%2F%3E%26nbsp%3B%20RequestId%3A%20ba930da7-ad7b-4a85-94d9-384712eb3f51%3CBR%20%2F%3E%26nbsp%3B%20DateTimeStamp%3A%202018-10-22T13%3A01%3A46%3CBR%20%2F%3EHttpStatusCode%3A%20Request_BadRequestvalue.InnerError%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EUpdate%20from%20instaled%20module%200.9.3%20to%20version%26nbsp%3B%3CSPAN%3E0.9.5%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3ECreation%20goes%20to%20live%20again%20without%20previous%20error%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EThank%20you%20for%20your%20post%2C%20that%20solve%20the%20issue%20in%20our%20Tenant%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-276131%22%20slang%3D%22en-US%22%3ERe%3A%20Powershell%20New-Team%20stops%20working%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-276131%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20everyone%2C%20I%20am%20having%20same%20problem.%20I%20just%20updated%20my%20module%20on%20local%20system%20and%20it%20is%20working%20fine%20here%20now.My%20issue%20is%20in%20%3CSTRONG%3EAzure%20powershell%20function%3C%2FSTRONG%3E%20we%20are%20using%20the%20same%20module%20with%20%3CSTRONG%3E%22Import%20Module%22%3C%2FSTRONG%3E%20command%20and%20i%20copied%20all%20the%20dll%20from%20%3CSTRONG%3E0.9.5%3C%2FSTRONG%3E%20to%20azure%20function%20file%20directory.%20Import%20is%20working%20fine%20but%20%3CSTRONG%3E%22New-Team%22%3C%2FSTRONG%3E%20command%20giving%20me%20the%20same%20error%3A%3C%2FP%3E%3CP%3E%3CSPAN%3E%3CSTRONG%3ECode%3A%3C%2FSTRONG%3E%20Request_BadRequest%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%3CSTRONG%3EMessage%3A%3C%2FSTRONG%3E%20A%20value%20without%20a%20type%20name%20was%20found%20and%20no%20expected%20type%20is%20available.%20When%20the%20model%20is%20specified%2C%20each%20value%20in%20the%20payload%20must%20have%20a%20type%20which%20can%20be%20either%20specified%20in%20the%20payload%2C%20explicitly%20by%20the%20caller%20or%20implicitly%20inferred%20from%20the%20parent%20value.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3ECan%20you%20tell%20me%20what%20i%20am%20doing%20wrong%3F%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-274761%22%20slang%3D%22en-US%22%3ERe%3A%20Powershell%20New-Team%20stops%20working%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-274761%22%20slang%3D%22en-US%22%3EI%20had%20exactly%20the%20same%20effect%20here.%20Thanks%2C%20this%20helped%20me%20a%20lot.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-274338%22%20slang%3D%22en-US%22%3ERe%3A%20Powershell%20New-Team%20stops%20working%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-274338%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%2C%20the%20update%20solved%20this%20problem.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-274334%22%20slang%3D%22en-US%22%3ERe%3A%20Powershell%20New-Team%20stops%20working%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-274334%22%20slang%3D%22en-US%22%3E%3CP%3EAs%20you%20are%20using%20.93%20please%20upgrade%20%3CA%20href%3D%22https%3A%2F%2Fwww.powershellgallery.com%2Fpackages%2FMicrosoftTeams%2F0.9.5%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.powershellgallery.com%2Fpackages%2FMicrosoftTeams%2F0.9.5%3C%2FA%3E%20and%20if%20the%20issue%20still%20is%20there%20repost.%20It%20could%20be%20that%20they%20changed%20something%20to%20have%20a%20mandatory%20field.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EPlease%20be%20aware%20it%20is%20still%20Beta.%20In%20your%20script%20it%20seems%20it%20needs%20to%20have%20a%20extra%20parameter.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Deleted
Not applicable

I have a problem with the powerhell CMDLet New-Team. A Few weeks (before getting win10 1809) my script works to create a new Team using powershell.

 

Now it doesn't work anymore.

After Connect-Microsoft-Teams my login is ok.

 

New-Team -DisplayName "ASDF"
New-Team : Error occurred while executing
Code: Request_BadRequest
Message: A value without a type name was found and no expected type is available. When the model is specified, each
value in the payload must have a type which can be either specified in the payload, explicitly by the caller or
implicitly inferred from the parent value.
InnerError:
RequestId: d1dd522d-e8dc-44a5-a728-26e2be30088f
DateTimeStamp: 2018-10-17T06:41:12
HttpStatusCode: Request_BadRequest
In Zeile:1 Zeichen:1
+ New-Team -DisplayName "ASDF"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [New-Team], ApiException
+ FullyQualifiedErrorId : Microsoft.TeamsCmdlets.PowerShell.Custom.ErrorHandling.ApiException,Microsoft.TeamsCmdle
ts.PowerShell.Custom.NewTeam

 

Powershell Teams Modul is ver 0.93.

 

 

9 Replies
Solution

As you are using .93 please upgrade https://www.powershellgallery.com/packages/MicrosoftTeams/0.9.5 and if the issue still is there repost. It could be that they changed something to have a mandatory field.

 

Please be aware it is still Beta. In your script it seems it needs to have a extra parameter.

Thanks, the update solved this problem.

I had exactly the same effect here. Thanks, this helped me a lot.

Hi everyone, I am having same problem. I just updated my module on local system and it is working fine here now.My issue is in Azure powershell function we are using the same module with "Import Module" command and i copied all the dll from 0.9.5 to azure function file directory. Import is working fine but "New-Team" command giving me the same error:

Code: Request_BadRequest

Message: A value without a type name was found and no expected type is available. When the model is specified, each value in the payload must have a type which can be either specified in the payload, explicitly by the caller or implicitly inferred from the parent value.

 

Can you tell me what i am doing wrong?

Production Environment running version 0.9.3 error

 

20181022 15:01:46.494;Create-Team;Error;Source:Microsoft.TeamsCmdlets.PowerShell.Custom.Message:Error occurred while executing
Code: Request_BadRequest
Message: A value without a type name was found and no expected type is available. When the model is specified, each value in the payload must have a type which can be either specified in the payload, explicitly by the caller or implicitly inferred from the parent value.
InnerError:
  RequestId: ba930da7-ad7b-4a85-94d9-384712eb3f51
  DateTimeStamp: 2018-10-22T13:01:46
HttpStatusCode: Request_BadRequestvalue.InnerError

 

Update from instaled module 0.9.3 to version 0.9.5

 

Creation goes to live again without previous error

 

Thank you for your post, that solve the issue in our Tenant

Delete the olf Modules in the Azure function. I had the same trouble here, it looked like the new version was not gotten at all although I changed my Import-Module references in the function code. It seems that Azure functions do a lot of caching while executing. Even restarting it explicitely did not change the behaviour.

 

After I deleted the old 0.93 module with Kudo it worked like a charm.

Thanks Carsten . I already done it and my luck is with me. Sorted :)

Good to hear. :) Nevertheless it would be interesting why this kind of behaviour happens in PowerShell Azure Functions.

I think its because of PS session for Azure Function loading the old session with modules loaded in session of PS doesn't update the session of module functions
Related Conversations