Tab (Word/Excel/PowerPoint) in channel not able to open the file showing error "Sorry, this file has been deleted or moved" but the file is present in Files![224738-capture.jpg][1] [1]: /api/attachments/224738-capture.jpg?platform=QnA else if (tab.TeamsApp.Id == "com.microsoft.teamspace.tab.file.staticviewer.word" || tab.TeamsApp.Id == "com.microsoft.teamspace.tab.file.staticviewer.excel" || tab.TeamsApp.Id == "com.microsoft.teamspace.tab.file.staticviewer.powerpoint" || tab.TeamsApp.Id == "com.microsoft.teamspace.tab.file.staticviewer.pdf") { int pFrom = tab.Configuration.ContentUrl.IndexOf("https://" + authDomain + "/sites/") + ("https://" + authDomain + "/sites/").Length; int pTo = tab.Configuration.ContentUrl.LastIndexOf("/Shared", StringComparison.OrdinalIgnoreCase); string firstString = tab.Configuration.ContentUrl.Substring(0, pFrom); string secondString = tab.Configuration.ContentUrl.Substring(pTo, tab.Configuration.ContentUrl.Length - pTo); tab.Configuration.ContentUrl = firstString + siteName + secondString; //GetPath and EntityId int getPos = tab.Configuration.ContentUrl.IndexOf("Shared Documents", StringComparison.OrdinalIgnoreCase) + ("Shared Documents").Length; var filePath = tab.Configuration.ContentUrl.Substring(getPos + 1, tab.Configuration.ContentUrl.Length - getPos - 1); DriveItem fileItem = null; fileItem = graphServiceClient.Groups[_CurrTeamId].Drive.Root.ItemWithPath(filePath).Request().GetAsync().Result; int start = fileItem.ETag.IndexOf("{") + 1; int end = fileItem.ETag.IndexOf("}", start); string entityId = fileItem.ETag.Substring(start, end - start); tab.Configuration.EntityId = entityId; } var newTab = new TeamsTab() { AdditionalData = new Dictionary<string, object> { { "******@odata.bind", $"https://graph.microsoft.com/"+graphVersion+$"/appCatalogs/teamsApps/" + tab.TeamsApp.Id} }, DisplayName = tab.DisplayName, Configuration = tab.Configuration, //SortOrderIndex = tab.SortOrderIndex, WebUrl = tab.WebUrl, Id = tab.Id }; var createTab = graphServiceClient.Teams[_CurrTeamId].Channels[_CurrChannelId].Tabs.Request().AddAsync(newTab).Result;