79133789

Date: 2024-10-28 14:22:26
Score: 2
Natty:
Report link

I have had this problem earlier and managed to solve it. What I have done is simply just put this in the homepage(first page the app is rendering) in my blazor project

`@inject TeamsUserCredential teamsUserCredential

@inject MicrosoftTeams MicrosoftTeams

protected override async Task OnAfterRenderAsync(bool firstRender) { await base.OnAfterRenderAsync(firstRender); if (firstRender) { var isInTeams = await MicrosoftTeams.IsInTeams(); if (isInTeams) { UserInfo user = await teamsUserCredential.GetUserInfoAsync(); } StateHasChanged(); } }`.

Maybe the code have tried to connect to Teams by this before the timeout, so that the error disappeared? But it works for me.

Reasons:
  • Whitelisted phrase (-1): works for me
  • Long answer (-0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Unregistered user (0.5):
  • User mentioned (1): @inject
  • Low reputation (1):
Posted by: anonam