How to integrate with email accounts using MS Graph instead of IMAP?

Hello All,

Our organization is migrating from the IMAP approach to Microsoft Graph with Office 365 using OAUTH 2.0.

to integrate we need azure as per few articles ,
when we refer pdn we did not find any steps,
It would be really useful if someone could guide me step-by-step on how to do that.

@konuric7 can you confirm which Community posts you checked for details?

I found the following. Email Account Using Microsoft Graph As Receiver With Office 365 Email Provider In 8.4.3 Doesn’t Work

and Using Graph API for inbound email integration

and Failure to integrate Microsoft Office 365 Email Account with Microsoft Graph

and Pega AWS Cloud to In-house Microsoft Azure Cloud Migration

Did you check the Creating an email account. configuration details listed in the Email supports Microsoft Graph Release Notes?

There are some external resources, such as this one.

The main pega documentation can be found here:

Use Microsoft Graph to receive email more securely (8.4)

Send email securely by using Microsoft Graph (8.6)

Configuring OAuth 2.0 authentication for sending and receiving emails by using Microsoft Graph

Please let us know if any details are missing.

For help with the Azure side, please reach out to your pega account executive if you need guidance. They will instruct you on the next steps if there is no further input on this forum post.

@MarijeSchillern thanks for the reply. but now i am facing another issue after configuring the MSGraph with OAUTH 2.0 Profile,getting below error.so,please let me know how to resolve this issue.

Failed while retrying to fetch accesstoken for clientID = x(…): Access token endpoint invocation failed : {ErrorMessage=Response status : 400 Bad Request, statuscode=400}

@konuric7 I’m assuming you followed Accessing the Pega API by using OAuth 2.0

AccessTokens are instances of Data-Admin-Security-OAuth2-AccessToken and are saved in DB. Look at the java step in OOTB activity GetOperatorAccessToken to retrieve the AccessToken.

Are you passing all the required parameter in the request? Mostly looks like configuration issue.

Are you able to get the token if you simulate through postman

Do the steps listed in the Failure to integrate Microsoft Office 365 Email Account with Microsoft Graph article not give you some troubleshooting steps?

Please also check out Retrieve id token and access token from Open ID authentication and OAuth2 refresh Token and OAuth2 OpenID Connect Token support

@konuric7 Hi , Is this issue is addressed ? Am also facing same issue .It is working fine with my existing setup i have But now our Client ID and Client Secret are expired and We updated the OAuth Profile with new set of generated Client Id and Secret Id in Azure application .When we do "Test Connectivity " on the Email account rule am also getting same exception.

“Failed while retrying to fetch accesstoken for clientID = XXXXXXXX: Access token endpoint invocation failed : {ErrorMessage=Response status : 400 Bad Request, statuscode=400}”.

Please let me know any additional information from your side .