This might happen if you use different credentials. This means, the windows credentials you signed in with are different than your Microsoft teams credentials. So, try logging in again by using correct credentials.