Forum Discussion
- Prasad_Das-MSFTMicrosoft
- To get if an user is Guest User or not , you can use below Microsoft Graph API endpoint:
https://graph.microsoft.com/v1.0/users?$filter=userType eq 'Guest'
Ensure at least any of the below permission scope is consented:
User.ReadBasic.All, User.Read.All, User.ReadWrite.All, Directory.Read.All,Directory.ReadWrite.All,Directory.AccessAsUser.All.
Under the response, you will get all the Guest Users added to your tenant. - To check if an user is Admin or not, You can use GET https://graph.microsoft.com/v1.0/me/memberOf and will get following object in the response:
{ "@odata.type": "#microsoft.graph.directoryRole", "id": "0ad7a218-f48f-4236-b4e5-7a6b85742146", "deletedDateTime": null, "description": "Can manage all aspects of Azure AD and Microsoft services that use Azure AD identities.", "displayName": "Global Administrator", "roleTemplateId": "62e90394-69f5-4237-9190-012177145e10" }
In the above response, the company administrator means tenant administrator.
If you want to useroleTemplateId-value
to check, you can use GET https://graph.microsoft.com/v1.0/directoryRoleTemplates/{roleTemplatedID-value}", and you will get the response like this:{ "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#directoryRoleTemplates/$entity", "id": "62e90394-69f5-4237-9190-012177145e10", "deletedDateTime": null, "description": "Can manage all aspects of Azure AD and Microsoft services that use Azure AD identities.", "displayName": "Global Administrator" }
In the response, the company administrator means the global administrator. 3. You can follow this link to get details of installed apps in Microsoft Teams.
Thanks,
Prasad Das
--------------------------------------------------------------------------------------------------------------------------------------------
If the response is helpful, please click "**Mark as Best Response**" and like it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate.
- To get if an user is Guest User or not , you can use below Microsoft Graph API endpoint: