.NET Core, .NET Framework, Microsoft Corporation, Microsoft Visual Studio Building Microsoft Teams Apps with Blazor
So you can follow this script as well and do the same. What i’m, showing you now in in this demo and i’ll, be copy pasting the code from that script, so we’ll start off with creating a new laser application and then let’s call it. That is something that i haven’t yet been. I have done i’ve practiced this a couple of times, so we’ll do a blazer server application using net5 and just the standard configuration with http and then let’s create that all right. So now we have the the blazer application created. So the first thing that i’m i’m going to do is that i will register the application in azure 80.. I have already registered this here in in azure 80, but i’ll just go through the the registration in in in general. So this is just a standard. Azure ad application registration, where, if we look at the authentication, uh i’m, using the single page application platform with specifying the root url to the to the application which i’ll be running locally in in in visual studio, there’s. Nothing special to this. This just a standard single tenant application and so just a normal application registration. The api permissions i’ve granted with or used admin content so that the users don’t have to consent to, to this permission, delegate the permissions separately so it’s just a bit easier for them, but otherwise this is just a standard application. Next thing, what i’m going to do is then i will configure that information in my application settings file i’ll just copy this from the blog post and then type in the in right information, and i need to copy the app to the client id because that i Don’T know from top of my head like that, then i’ll i will add a reference to the library.
It is available on nougat it’s, called blazeraid themes and it’s also available open source on github and so i’ll install that now it’s installed, and then i can close this up. I’Ll save that close and then i’ll take the import file and do some additions to that. One so that we get easier, much easier to reference the components close that up the next thing. What i’ll be doing is that i’ll do the configuration. This is just as you. You know this is just standard configuration that you do in asp.net, core application, so i’ll copy that and add the the configuration here so uh now i’m using the from my application settings, the themes app section and the client id and tenant id and just uh letting The laser rate teams know that this is the stuff that that it can use to actually do the authentication of the user. Then i will create one page in the application that this is the the personal tab page that or the page that represents uh the the personal tab. App and just call it personal like that, and then i will copy the code that i have on the blog here. Okay now now i’ll just explain a few bits here. Uh. So here is the well the normal routing that that is uh used in in blazer applications. But then this team’s application component is is part of blazeraid teams. That actually does a lot of stuff for you.
What you need to have in in the application. You can have a look at the app manifest. It looks like this and then on the last page. Here you can either download it or or install it directly if you have enabled what they call site loading of of teams apps in in your tenant. So you need to enable custom applications in in your tenant, but you can do that probably in a development tenant, no problem with that. Otherwise you need to download the manifest and ask an admin to to publish it for you. But what we’ll do now is just go ahead and install that edit and it will come here as an icon and now, when it runs, it will not run because i haven’t started the application in visual studio, but now again run it and when it’s loaded, we Can go back to the teams client, which is over here? I guess yes, and now, when i refresh that it will load – and here is the information that is coming from teams context and all of the authentication results with my access tokens and a list of scopes that it’s included and so on great great yeah. So then, people can just use like still going to start calling other apis using graph yeah, calling it to sharepoint and so on. Yeah yeah really cool, and i really like how we kind of made it easy to uh handle the team’s, sdk and kind of do all the the the plumbing essentially making it so simple for folks to use this.
So thanks mika great demo. I love it.