{"action":"created","issue":{"url":"https://api.github.com/repos/MicrosoftDocs/office-docs-powershell/issues/147","repository_url":"https://api.github.com/repos/MicrosoftDocs/office-docs-powershell","labels_url":"https://api.github.com/repos/MicrosoftDocs/office-docs-powershell/issues/147/labels{/name}","comments_url":"https://api.github.com/repos/MicrosoftDocs/office-docs-powershell/issues/147/comments","events_url":"https://api.github.com/repos/MicrosoftDocs/office-docs-powershell/issues/147/events","html_url":"https://github.com/MicrosoftDocs/office-docs-powershell/issues/147","id":295651409,"number":147,"title":"connect-microsoftteams with credential causes error","user":{"login":"robbert-vanandel","id":31135800,"avatar_url":"https://avatars0.githubusercontent.com/u/31135800?v=4","gravatar_id":"","url":"https://api.github.com/users/robbert-vanandel","html_url":"https://github.com/robbert-vanandel","followers_url":"https://api.github.com/users/robbert-vanandel/followers","following_url":"https://api.github.com/users/robbert-vanandel/following{/other_user}","gists_url":"https://api.github.com/users/robbert-vanandel/gists{/gist_id}","starred_url":"https://api.github.com/users/robbert-vanandel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robbert-vanandel/subscriptions","organizations_url":"https://api.github.com/users/robbert-vanandel/orgs","repos_url":"https://api.github.com/users/robbert-vanandel/repos","events_url":"https://api.github.com/users/robbert-vanandel/events{/privacy}","received_events_url":"https://api.github.com/users/robbert-vanandel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2018-02-08T20:17:46Z","updated_at":"2018-02-09T19:16:22Z","closed_at":null,"author_association":"NONE","body":"Using the following code.\r\n\r\n    $secpasswd = ConvertTo-SecureString \"password\" -AsPlainText -Force\r\n    $mycreds = New-Object System.Management.Automation.PSCredential (\"username@domain.com\", \r\n    $secpasswd)\r\n    \r\n    Connect-MicrosoftTeams -Credential $mycreds;\r\n\r\n\r\nCauses this set of errors to appear\r\n\r\n    Connect-MicrosoftTeams : One or more errors occurred.: AADSTS75005: The request is not a valid SAML 2.0 protocol message.\r\n    Trace ID: 5dc9b749-95d6-47d9-b3fe-2419a4161600\r\n    Correlation ID: a720051b-196a-43b2-9ae2-bc44544bbd53\r\n    Timestamp: 2018-02-08 20:11:47Z\r\n    At z:\\PowerShell\\create-ms-teams.ps1:22 char:1\r\n    + Connect-MicrosoftTeams -Credential $mycreds; \r\n    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n        + CategoryInfo          : AuthenticationError: (:) [Connect-MicrosoftTeams], AadAuthenticationFailedException\r\n        + FullyQualifiedErrorId : Connect-MicrosoftTeams,Microsoft.Open.Teams.CommonLibrary.ConnectMicrosoftTeams\r\n     \r\n    Connect-MicrosoftTeams : One or more errors occurred.\r\n    At z:\\PowerShell\\create-ms-teams.ps1:22 char:1\r\n    + Connect-MicrosoftTeams -Credential $mycreds;\r\n    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n        + CategoryInfo          : AuthenticationError: (:) [Connect-MicrosoftTeams], AggregateException\r\n        + FullyQualifiedErrorId : Connect-MicrosoftTeams,Microsoft.Open.Teams.CommonLibrary.ConnectMicrosoftTeams\r\n     \r\n    Connect-MicrosoftTeams : AADSTS75005: The request is not a valid SAML 2.0 protocol message.\r\n    Trace ID: 5dc9b749-95d6-47d9-b3fe-2419a4161600\r\n    Correlation ID: a720051b-196a-43b2-9ae2-bc44544bbd53\r\n    Timestamp: 2018-02-08 20:11:47Z\r\n    At z:\\PowerShell\\create-ms-teams.ps1:22 char:1\r\n    + Connect-MicrosoftTeams -Credential $mycreds; \r\n    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n        + CategoryInfo          : AuthenticationError: (:) [Connect-MicrosoftTeams], AdalServiceException\r\n        + FullyQualifiedErrorId : Connect-MicrosoftTeams,Microsoft.Open.Teams.CommonLibrary.ConnectMicrosoftTeams\r\n     \r\n    Connect-MicrosoftTeams :  Response status code does not indicate success: 400 (BadRequest).\r\n    At z:\\PowerShell\\create-ms-teams.ps1:22 char:1\r\n    + Connect-MicrosoftTeams -Credential $mycreds; \r\n    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n        + CategoryInfo          : AuthenticationError: (:) [Connect-MicrosoftTeams], HttpRequestException\r\n        + FullyQualifiedErrorId : Connect-MicrosoftTeams,Microsoft.Open.Teams.CommonLibrary.ConnectMicrosoftTeams\r\n     \r\n    Connect-MicrosoftTeams : {\"error\":\"invalid_request\",\"error_description\":\"AADSTS75005: The request is not a valid SAML 2.0 protocol message.\\r\\nTrace ID: \r\n    5dc9b749-95d6-47d9-b3fe-2419a4161600\\r\\nCorrelation ID: a720051b-196a-43b2-9ae2-bc44544bbd53\\r\\nTimestamp: 2018-02-08 \r\n    20:11:47Z\",\"error_codes\":[75005],\"timestamp\":\"2018-02-08 \r\n    20:11:47Z\",\"trace_id\":\"5dc9b749-95d6-47d9-b3fe-2419a4161600\",\"correlation_id\":\"a720051b-196a-43b2-9ae2-bc44544bbd53\"}\r\n    At z:\\PowerShell\\create-ms-teams.ps1:22 char:1\r\n    + Connect-MicrosoftTeams -Credential $mycreds; \r\n    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n        + CategoryInfo          : AuthenticationError: (:) [Connect-MicrosoftTeams], Exception\r\n        + FullyQualifiedErrorId : Connect-MicrosoftTeams,Microsoft.Open.Teams.CommonLibrary.ConnectMicrosoftTeams\r\n     \r\n    Connect-MicrosoftTeams : One or more errors occurred.: AADSTS75005: The request is not a valid SAML 2.0 protocol message.\r\n    Trace ID: 5dc9b749-95d6-47d9-b3fe-2419a4161600\r\n    Correlation ID: a720051b-196a-43b2-9ae2-bc44544bbd53\r\n    Timestamp: 2018-02-08 20:11:47Z\r\n    At z:\\PowerShell\\create-ms-teams.ps1:22 char:1\r\n    + Connect-MicrosoftTeams -Credential $mycreds;\r\n    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n        + CategoryInfo          : NotSpecified: (:) [Connect-MicrosoftTeams], AadAuthenticationFailedException\r\n        + FullyQualifiedErrorId : Microsoft.Open.Teams.CommonLibrary.AadAuthenticationFailedException,Microsoft.Open.Teams.CommonLibrary.ConnectMicrosoftTeams\r\n     \r\n\r\nI am working on an automated process, so I need a way to connect to Teams without user interaction."},"comment":{"url":"https://api.github.com/repos/MicrosoftDocs/office-docs-powershell/issues/comments/364532176","html_url":"https://github.com/MicrosoftDocs/office-docs-powershell/issues/147#issuecomment-364532176","issue_url":"https://api.github.com/repos/MicrosoftDocs/office-docs-powershell/issues/147","id":364532176,"user":{"login":"SamCosby","id":35772711,"avatar_url":"https://avatars0.githubusercontent.com/u/35772711?v=4","gravatar_id":"","url":"https://api.github.com/users/SamCosby","html_url":"https://github.com/SamCosby","followers_url":"https://api.github.com/users/SamCosby/followers","following_url":"https://api.github.com/users/SamCosby/following{/other_user}","gists_url":"https://api.github.com/users/SamCosby/gists{/gist_id}","starred_url":"https://api.github.com/users/SamCosby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SamCosby/subscriptions","organizations_url":"https://api.github.com/users/SamCosby/orgs","repos_url":"https://api.github.com/users/SamCosby/repos","events_url":"https://api.github.com/users/SamCosby/events{/privacy}","received_events_url":"https://api.github.com/users/SamCosby/received_events","type":"User","site_admin":false},"created_at":"2018-02-09T19:16:22Z","updated_at":"2018-02-09T19:16:22Z","author_association":"CONTRIBUTOR","body":"IDP is outputting invalid SAML information. Needs to have SAML 2.0 vs. SAML 1.0 for the module to connect. \r\n"}}
{"actor":{"display_login":"SamCosby"}}