Forum Discussion
Issue with GraphAPI Uploads to Teams-Associated SharePoint and Viewer Error
Issue:
- It is possible to upload files to SharePoint associated with Teams using GraphAPI, and it can be uploaded to a folder associated with the team.
- When attaching a file via GraphAPI to post in Teams, it shows as attached on the UI, but when trying to preview by pressing the icon, it results in an error in the viewer.
What was checked:
I uploaded the same set of attached files from Teams UI and retrieved the chat content via GraphAPI to check the attachments object. I set the same key as the attachments object while sending the chat message via GraphAPI, but the issue was not resolved.
Observation:
When transitioning to the viewer, the correct URL should be https://teams.microsoft.com/_?culture=ja-jp&country=jp#/txt/viewer/teams_ns/${sharepointUrl},
but files uploaded via GraphAPI have a URL like https://teams.microsoft.com/_?culture=ja-jp&country=jp#/txt/viewer/null_ns/${sharepointUrl}.
The difference lies in teams_ns and null_ns.
Reference:
Discussion on a similar issue on the Microsoft Forum (not closed as of today).
https://techcommunity.microsoft.com/t5/teams-developer/send-chat-message-with-attachment-in-teams-channel/m-p/3620579
6 Replies
- ChetanSharma-msft
Microsoft
Hello shuheitagawa - Thanks for raising your query.
We will look into it and let you know the updates.- shuheitagawaCopper ContributorHello, do you have any updates on this?
We build the application which works with Microsoft-Teams and this problem is critical issue for us.
Thank you in advance.- Meghana-MSFT
Microsoft
We are checking this internally, we will get back to you.