[Bug]: 'Prepare Teams apps dependencies' step fails with error "Credential lifetime exceeds the max value allowed as per assigned policy '538f1913-366a-440a-95a0-e195cb55b282"
Prasad-MSFT opened this issue · comments
Sample
msgext-multiparam-csharp
Description
While setting up this sample (Copilot-for-M365-Plugins-Samples/samples/msgext-multiparam-csharp at main · OfficeDev/Copilot-for-M365-Plugins-Samples (github.com)), we came across below error while trying to Run Prepare Teams apps dependencies
Error Details:
{"error":{"code":"CredentialInvalidLifetimeAsPerAppPolicy","message":"Credential lifetime exceeds the max value allowed as per assigned policy '538f1913-366a-440a-95a0-e195cb55b282'.","details":[{"code":"InvalidKeyEndDate","message":"Credential lifetime exceeds the max value allowed as per assigned policy '538f1913-366a-440a-95a0-e195cb55b282'."
Steps to reproduce
Right-click on your project.
Select Teams Toolkit > Prepare Teams App Dependencies.
Your Microsoft 365 account needs to have the custom app upload permission before you sign in. Ensure that your Teams app can be uploaded to the tenant, otherwise your Teams app can fail to run in Teams Client.
Sign in to your Microsoft 365 Account and then select Continue.
Expected results
This step should get completed successfully and we should be able to 'Start Debugging'
Actual results
Failed to Execute lifecycle provision due to failed action: botAadApp/create. HttpClientError:A http client error happened while performing the botAadApp/create task. The error response is: {"error":{"code":"CredentialInvalidLifetimeAsPerAppPolicy","message":"Credential lifetime exceeds the max value allowed as per assigned policy '538f1913-366a-440a-95a0-e195cb55b282'.","details":[{"code":"InvalidKeyEndDate","message":"Credential lifetime exceeds the max value allowed as per assigned policy '538f1913-366a-...
Additional Info
No response
Sorry for the trouble @Prasad-MSFT
This seems like it's an issue in Teams Toolkit than the sample itself.
Are you able to create and run a project created from a message extension template in VS?
Hi @Prasad-MSFT a recent policy change inside Microsoft tenant resulted in this error. Please follow the workaround in OfficeDev/teams-toolkit#10905 to mitigate this issue.