Dear Nishank,
Good day!!
Apologies for the inconvenience caused and please don’t worry, let’s work together on your concern and move towards a resolution.
I understand your concern and would like to let you know that I have tested the behavior by generating the embed code for the Office files stored in OneDrive for Business and SharePoint Online, where we encounter the same error as you explained when pasted the embed code in the Link of the card:
as shown in the screenshot on the bottom of my reply.
If you are also trying to paste the embed code in the Link, I would like to let you know that the Web Link only supports the https link where Embed code is not supported.
In order to Embed the Office documents in the Sway, please try the steps explained in this article: Embed an Office document in Sway - Microsoft Support
If you are following the steps in the above article and having the issues, then the behavior you are facing is not an expected behavior and suggest you raise a support ticket from the Office 365 admin center, where the related team will collect the HAR logs and find out the cause of the problem.
Reference: Get support - Microsoft 365 admin | Microsoft Learn
Note: To create a support ticket, you need to have admin privileges and if you aren’t admin of your Office 365 organization, please contact the admin of creating a new ticket.
Apologies for redirecting you to the related development team support as the moderators in this community have limited resources to collect and investigate the HAR logs, and to get the fast and better assistance we requested for it.
Appreciate your patience and understanding. Have a great day!!
Best Regards,
Sophia
