Reputation: 1
My company - Pleaz - is building a SaaS solution for companies to buy for their teams, which they can use to do an active break together doing the work day.
We want to build a teams app where a person in a teams meeting can launch the app, which will trigger the start of the application that will instruct meeting participants on what physical exercise to do.
My question is: How do you manage authentication in the meeting? So, if we have 10 participants and only the 1 that launches the app is a known user, what happens with the remaining 9 participants? We want to restrict access to the video stream (including audio) to people who have created a user.
As a minimum, I would like to understand where I can find information about what we can - and cannot do - within a Teams app. Any answer or link to a resource where I can read about this would be greatly appreciated.
Thank you
Upvotes: 0
Views: 112
Reputation: 369
If you have integrated a tab with your meeting, then your app must follow the Teams single sign-on (SSO) authentication flow for tabs.
OR
The flow mentioned in Microsoft Teams authentication flow for tabs is applicable for custom login providers as well.
Here are the steps:
Provide Login button to the user.Call
microsoftTeams.authentication.authenticate()
with list of providers to choose from.
microsoftTeams.authentication.authenticate({
url: window.location.origin + "/tab-auth/choose-provider",
width: 600,
height: 535,
successCallback: function (result) {
getUserProfile(result.accessToken);
},
failureCallback: function (reason) {
handleAuthError(reason);
}
});
Provide option for user to choose from different authentication methods. See this image - authentication pop-up
On click of selction of provider you can redirects user to respective identity provider where user can complete the login.
Make sure to set redirect URL which is on same domain as your '/tab-auth/choose-provider' page.
Once you are redirected after successful login you can call
microsoftTeams.authentication.notifySuccess()
with parameters like
session id/ auth token.
microsoftTeams.authentication.notifySuccess()
will close the pop-up
and now you can redirect authenticated user to page of your choice.
Upvotes: 1