-
Notifications
You must be signed in to change notification settings - Fork 802
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Outlook Web Add-in Blazor Example for OnMessageSend Event #578
Comments
Hi @CorithMalin82, Unfortunately, I don't think this scenario will work. When Outlook on Windows launches your code to handle an event it uses a plain JavaScript engine. There's no UI or browser runtime, which likely Blazor WebAssembly would expect. It's possible it might work in Outlook on the browser. In that case Outlook will use the browser to run your event code. Have you tried that scenario? @aafvstam do you have any ideas here? Thanks! |
Hi @davidchesnut, Do you know if Blazor apps for the Thanks for your thoughts and comments. |
Hi @CorithMalin82, thanks for sharing your scenario. I found this documentation on Blazor webassembly which I think confirms it is dependent on a DOM (from diagram and descriptions). I know the JS Runtime used for Outlook events doesn't have a DOM. I do have a question out to the Blazor team to see if there is any workaround, and will post an update if I find anything. Unfortunately for now, I don't think it's possible. |
@davidchesnut - Just wanted to check in with you to see if the Blazor team ever got back to your question. No worries if they didn't as I appreciate that you reached out to them. :) |
Hi @CorithMalin82, yes I checked into this more and discovered that the JavaScript engine that runs your event code doesn't support loading JS libraries. There's no way to provide an HTML Script tag to point to any libraries. So right now there isn't a way to load Blazor with event code in Outlook. If you want to request this feature, please go to our feature request site for Microsoft 365. You can create a request with more details there. One thing we are curious about, since there is no UI in events, is are you just wanting Blazor to run c# code, or is there more to your scenario? We'd like to know more. Thanks! |
Hi @davidchesnut - I'll put more info in the feature request form and thank you for all this research and re-assurance that what we were trying to do is actually impossible at this time. :) We mainly do want Blazor to run C# code for the send events. The main reason for this is that we have a well developed library for data extraction and analysis and it is written in .Net as, at the time, we wanted to be able to run it everywhere. What we've found is that having our web add-in call a service in the cloud which then contacts graph, which then uses our extraction library, and then returns the results back to the web add-in... it's just too slow (especially for messages with attachments). On top of that, many clients prefer extraction is done locally and our system only receives the metadata about what was extracted. |
Question
(asked on stackoverflow, but was directed to ask here)
I've seen and followed the sample for creating an Outlook Web Add-in using Blazor for a TaskPane add-in. I've tried adapting it to work with the OnMessageSend event of web add-ins. I've hit a wall though trying to get it to load. From what I can tell, the main difference between a TaskPane and OnMessageSend add-in that stops this from working is that a TaskPane add-in requires an HTML endpoint to be invoked/called and the OnMessageSend add-in requires a JavaScript function. But there doesn't seem to be a way with a Blazor app to make the entry point a javascript function (it has to be a web page being loaded)?
Am I missing something obvious that would enable a web add-in targeting the OnMessageSend feature to use Blazor or WASM?
Thanks!
The text was updated successfully, but these errors were encountered: