{"id":4257,"date":"2024-10-07T12:18:46","date_gmt":"2024-10-07T11:18:46","guid":{"rendered":"https:\/\/www.lieben.nu\/liebensraum\/?p=4257"},"modified":"2024-10-07T12:18:46","modified_gmt":"2024-10-07T11:18:46","slug":"get-csteamsmeetingpolicy-invalid-credential-provide-valid-credential","status":"publish","type":"post","link":"https:\/\/lieben.nu\/liebensraum\/2024\/10\/get-csteamsmeetingpolicy-invalid-credential-provide-valid-credential\/","title":{"rendered":"Get-CsTeamsMeetingPolicy: Invalid credential Provide valid credential."},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">For those googling, above error happened for us when trying to use application-based authentication for the MS Teams PowerShell commandlets. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We followed <a href=\"https:\/\/learn.microsoft.com\/en-us\/MicrosoftTeams\/teams-powershell-application-authentication\">the instructions<\/a> but kept getting Invalid credential Provide valid credential whenever calling a cmdlet, while the connect-microsoftteams command worked fine with the -accesstokens param.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Turns out, when you assign <strong>application<\/strong> level permissions to your service principal <strong>on top<\/strong> of the <strong>delegated<\/strong> permissions, the SPN is not authorized for all subsequent cmdlet calls :O<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For those googling, above error happened for us when trying to use application-based authentication for the MS Teams PowerShell commandlets. We followed the instructions but kept getting Invalid credential Provide valid credential whenever calling a cmdlet, while the connect-microsoftteams command worked fine with the -accesstokens param. Turns out, when you assign application level permissions to &hellip; <a href=\"https:\/\/lieben.nu\/liebensraum\/2024\/10\/get-csteamsmeetingpolicy-invalid-credential-provide-valid-credential\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Get-CsTeamsMeetingPolicy: Invalid credential Provide valid credential.<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","footnotes":""},"categories":[13,27,39,43],"tags":[],"class_list":["post-4257","post","type-post","status-publish","format-standard","hentry","category-entraid","category-microsoft-teams","category-powershell","category-security"],"_links":{"self":[{"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/posts\/4257","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/comments?post=4257"}],"version-history":[{"count":0,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/posts\/4257\/revisions"}],"wp:attachment":[{"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/media?parent=4257"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/categories?post=4257"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/tags?post=4257"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}