Microsoft 365 and Office | SharePoint | For business | Windows
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I am using the below code to sending invite but facing issues while sending email.
can someone help me to identify the issue
public SendInvitationtoExternalUsers = async (ExternalUserEmail, ID): Promise<[]> => {
this._graphClient = await this.spcontext.msGraphClientFactory.getClient(); //TODO
let InvitaitonSuccessData: [] = [];
try {
const InvitationResponse = await this._graphClient.api(`/invitations`).version('v1.0').post({
"invitedUserType": "Guest",
"sendInvitationMessage": true,
"invitedUserEmailAddress": "" + ExternalUserEmail + "",
"inviteRedirectUrl": "https://demotenant.sharepoint.com/sites/samplepage.aspx?Guestinvitations=true&RequestType=New&ViewID="+ID+"&env=WebView",
"invitedUserMessageInfo": {
"customizedMessageBody": "Greetings from tenant !!! Thank you for joining with us."
}
});
InvitaitonSuccessData = InvitationResponse.value as [];
} catch (error) {
console.log('Unable to sent invitation to external user', error);
}
return InvitaitonSuccessData;
}
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
An API that connects multiple Microsoft services, enabling data access and automation across platforms