We are planning to connect to MS O365 to send outbound email using MS Graph and the question we are being asked is if we can add any custom API headers to the Graph endpoint that pega invokes.
Looking at few ootb utilities like SendSimpleEmail (used in the send email shape) and pxCreateAndSendEmail automation (which has header param - but not sure if this is used for API header or used as email headers), it doesn't look like we have an option to pass custom headers as part of the MS Graph API call that the system invokes.
Tried to populate the headers params in the pxCreateAndSendEmail with a customer header and printing the debug details in the log (as we do not have full end to end setup yet), cannot see this header being printed but can see the Authorization header value printed in the logs.
Is there an extension point that we can use to add custom headers to the MS graph implementation that pega internally invokes for email or is the headers param in pxCreateAndSendEmail automation supposed to support this requirement?
***Edited by Moderator: Pooja Gadige to add capability tag***
Thanks for reaching out and I would be happy to answer your question.
Email headers generally specify specific sending and return options for email. You could use custom headers to add great many things. The "Headers" parameter in pxCreateAndSendEmail is to add email headers such as "Reply-To", "Importance" etc. but not for sending custom API headers to Microsoft Graph endpoint.
To understand it better, may I ask you the exact usecase you are trying to realize here?
@nvkap Thanks for your response and confirming that the Headers param in that automation is not for the API headers.
The ask from our internal messaging team is for the applications/systems sending emails to pass a custom header so that they could differentiate where the email originates from and apply controls around it.
Are there any extension points available to add a custom API header to pega's MS Graph impl? Looking at the code, can't seem to find anywhere this could be done but happy to be corrected.