简体   繁体   中英

ASP Net Teams Tab Authentication

I have a ASP.net WebApp as a teams tab in Teams, I want to be able to authenticate in AAD. Can the JS examples be used to then secure parts of the .Net WebApp?

Could you please look at Authenticate a user in a Microsoft Teams tab documentation?

Here is how you could initiate authentication in Tab:

microsoftTeams.authentication.authenticate({
    url: window.location.origin + "/tab-auth/simple-start",
    width: 600,
    height: 535,
    successCallback: function (result) {
        getUserProfile(result.accessToken);
    },
    failureCallback: function (reason) {
        handleAuthError(reason);
    } });

Here is complete sample code: microsoft-teams-sample-auth-node

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM