Level Up Your Teams Extensibility Game with Blazor – Session materials from Scottish Summit 2024

3 min read.

This article will contain links, materials, slides (should I get the permission to post them) and other stuff related to my session at Scottish Summit 2024. In case you stopped by my session – thanks! If you’re just visiting for any reason – make sure to check the slides out first, and the rest should probably make more sense to you!

Right now, it’ll have a few missing pieces (everything that has a [TBA] tag will be added later).

Materials

Slides will be shared by the Scottish Summit organization in PowerPoint form – here’s a SlideShare link, but unfortunately the site refused to accept my .pptx file (I assume it was too large), so they’re in .pdf format.

Learnings and takeaways

Here are the links to the issues (and workarounds) I mentioned during the session.

  • AAD app registration reuse
    • You can replicate the right preauthorized applications by copypasting from the manifest (and there are quite a few)
    • And you can reuse the same app registration if you mess with the app URIs – also something you can do by changing the manifest. Blog article TBA.
  • DefaultCredential refresh
    • Link TBA
  • Graph Client is tricky, but you get it from free using TeamsFx
    • Tips:
      • .WithUrl(‘url’) is your friend
      • Graph Explorer is your friend
      • Getting an authenticated GraphClient from the token you get from TeamsFX is pretty damn nice
    • Issues:
      • Cumbersome classes that change between versions
      • Auto-generated “RequestBuilder” approach is dubious
      • Kiota is technically impressive, but a really lazy approach for an SDK…
      • GitHub Copilot doesn’t understand the SDK either
      • Mismatch between models and versions of v1.0 and beta (different packages)
      • Changing from v1.0 to beta requires switching to different NuGet, and the models between beta and stable NuGets can be completely different
    • This crashes the app silently:
    • This will work:
  • Dependencies can be messy
    • Don’t update “just in case”
    • Microsoft.Graph and Microsoft.Graph.Beta are not in sync
    • There’s at least 2 FluentUI nuget packages
    • The one that came with the template didn’t have symbols for IntelliSense…
  • IntelliSense might freak out with Razor components (especially with Hot Reload)
  • GitHub Copilot not always helpful
    • Blazor support doesn’t always work
    • Razor support is great!
    • Graph SDK support is not great
    • “Generic” .NET support is great
    • “Chatting” with it will slow you down tremendously…
  • Remember to enable Hot Reload on file save (you probably want that!)
  • Testing anything in Teams’ browser version is loud
    • Pictures TBA, Teams has so many exceptions and issues out-of-the-box that isolating what your app is doing is sometimes tricky
  • Microsoft Dev Home & Dev Drive
    • Don’t bother with them, this workflow gets negligible performance improvements and it’s just another thing that’ll break
  • Azure Key Vault
    • Implement ASAP after starting because you don’t want to keep your credentials in code or appsettings files, code sample TBA
  • Repackaging per-tenant can be cumbersome
    • Read the docs and you can maintain multiple .env files to support multiple environments

Key learnings

  • Blazor – stable and highly productive, but lets you do horrible stuff
  • Graph SDK – still feels unfinished (but Graph is great!)
  • Tooling – unstable, great when works
  • Extending Teams – pretty easy (but you need an admin friend for Entra)
  • GitHub Copilot – productive, but unreliable (and chatting is slow)
  • GitHub Actions – easy to use for deploying (it’s just a tiny web app!)

Setting up GitHub Actions workflow

Just use the basic .NET web app template. If you want to replace secrets (or a KeyVault name, like I did), store them in GitHub Repository Secrets.

Questions

[TBA]

References

mm
0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments