Can I disable the email notification invitation using Microsoft Graph API

Prabhakar.Billingi 66 Reputation points
2020-07-10T10:33:52.797+00:00

By using invitation Microsoft Graph API I'm able to send an email notification to the invited user. User accepted the invitation.

My question :

  1. After acceptance of an invitation, If I tried to send an invitation to the same user it will sending an email again. Can I disable the email notification to the accepted users.
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
21,904 questions
0 comments No comments
{count} votes

Accepted answer
  1. AmanpreetSingh-MSFT 56,626 Reputation points
    2020-07-10T10:50:24.457+00:00

    @9982c2a9-df9e-49ee-8db8-68420607ec20

    You need to add "sendInvitationMessage":false to the body of your Post call. Please refer to below Graph Call and Body:

    Call:
    POST https://graph.microsoft.com/v1.0/invitations

    Body:
    {"invitedUserEmailAddress":"user@example.com","sendInvitationMessage":false,"inviteRedirectUrl":"https://myapp.com"}

    In order to get a list of all guest users who have accepted and who haven't accepted the invite, you can use below call:

    GET https://graph.microsoft.com/beta/users?$filter=UserType eq 'Guest'&$select=displayname,externalUserState

    To get a list of only those users who have accepted the invite, use below call:

    GET https://graph.microsoft.com/beta/users?$filter=externalUserState eq 'Accepted'&$select=DisplayName,externalUserState
    or
    https://graph.microsoft.com/beta/users?$filter=UserType eq 'Guest'&$filter=externalUserState eq 'Accepted'&$select=DisplayName,externalUserState
    or
    https://graph.microsoft.com/beta/users?$filter=UserType eq 'Guest'&$filter=externalUserState eq 'Accepted'


    Please do not forget to "Accept the answer" wherever the information provided helps you. This will help others in the community as well.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.