I am using the guest user invitation api as defined here to add a guest user to my Active Directory.
The post request succeeds with a 201 response code and returns the following data:
{
"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#invitations/$entity",
"id":"xxx",
"inviteRedeemUrl":"https://invitations.microsoft.com/redeem/?tenant=xxx&ticket=xxx&ver=2.0",
"invitedUserDisplayName":"xxx",
"invitedUserType":"Guest",
"invitedUserEmailAddress":"[email protected]",
"sendInvitationMessage":false,
"inviteRedirectUrl":"http://localhost:4200/",
"status":"PendingAcceptance",
"invitedUserMessageInfo":{
"messageLanguage":null,
"customizedMessageBody":null,
"ccRecipients":[
{
"emailAddress":{
"name":null,
"address":null
}
}
]
},
"invitedUser":{
"id":"xxx"
}
}
When I check the active directory using the Azure UI, I see that the user is created in the directory. But I never receive an invitation email, unless I click the resend invite button in the UI for the user.
How can I make sure that an invite email is sent when I send my request to the invite api, without having to manually click the resend invite button for the user?