<p>I had the same problem and it actually made me crazy especially because it may take a few hours to apply changes. Finally I was able to resolve the problem in the following way. I can imagine that certain steps are unnecessary but who knows.</p>
<ul>
<li>
<p>By following instructions in the <a href="https://learn.microsoft.com/en-us/microsoftteams/teams-custom-app-policies-and-settings">Manage app setup policies in Microsoft Teams</a>, enable “Upload custom apps” in “Global (Org-wide default)”.</p>
</li>
<li>
<p>Following same instructions created a custom setup policy with enabled “Upload custom apps”.</p>
</li>
<li>
<p>Enable all permissions in “Global (Org-wide default)” as described in the <a href="https://learn.microsoft.com/en-us/microsoftteams/teams-app-permission-policies">Manage app permission policies in Microsoft Teams</a></p>
</li>
<li>
<p>Create a new permission policy with everything enabled.</p>
</li>
<li>
<p>Wait about an hour.</p>
</li>
<li>
<p>Assign these new policies to the user.</p>
</li>
<li>
<p>Make sure that everything what is mentioned in <a href="https://learn.microsoft.com/en-us/microsoftteams/teams-custom-app-policies-and-settings">Manage custom app policies and settings in Microsoft Teams</a> is enabled.</p>
</li>
<li>
<p>Wait another hour.</p>
</li>
<li>
<p>Quit desktop application, and start it again.</p>
</li>
</ul>
<p>Now, finally, it works.</p>