GraphAPI returns BadGateway for Teams App Unistall call

Solution 1:

It seems you are trying to remove preInstalled app which is preInstalled by Admin. Below is the internal error:

ODataExceptionFilter is handling an exception. Exception type: AppIsTenantAdminPreinstalled. Exception details: Microsoft.SkypeSpaces.MiddleTier.Common.Exceptions.ProviderException: Trying to RemoveUserAppEntitlement for an App that is explicitly preinstalled by the tenant admin. at Microsoft.SkypeSpaces.MiddleTier.Provider.Apps.AppDefinitionItemExtensions.d__48.MoveNext() in D:\a_work\1\s\Source\Provider\Provider\Apps\ObjectExtensions\AppDefinitionItemExtensions.cs:line 1638