Forum Discussion

ronnyar's avatar
ronnyar
Copper Contributor
Feb 11, 2021

Using userTeamRole is not working

Hello,

We are developing a teams app and we are trying to get the user role in order to distinguish between regular user and administrators. 

We call microsoftTeams sdk as follows:

 

microsoftTeams.getContext(function(context) {
var role = context.userTeamRole;
});

 

The issue is that the userTeamRole returns undefined and it seems the context does not include this information.

 

Do we need to define something in order to get it?

Is there an alternative way to know if the user is administrator or not?

 

Thanks,

Ronny

Resources