Unable to configure outlook 365 service account in logic apps to send email notification

Swati Chothani 1 Reputation point
2022-02-28T21:03:21.507+00:00

I have outlook 365 service account which I need to configure in logic apps for sending email notifications as the requirement is email should come from common email id and not individual data engineer id.

Below are some notes -

  1. I am able to login this service account using outlook.com and able to send/receive emails
  2. When configuring in the workflow it says connection successful .

178615-image.png

  1. Using outlook 365 connector to configure the account

178633-image.png
I am receiving below error when I run the workflow

{
"status": 404,
"message": "Error from token exchange: The connection (logic-apis-eastus/office365/.......) is not found. Please create new connection and change your application to use the new connection."
}"

Please let me know what is that is missed in setting up this workflow.
When I change the connect to use my id it works but with service account it establishes connection but when workflow is execute it gives above error.

Thanks.

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
2,991 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Mike Urnun 9,786 Reputation points Microsoft Employee
    2022-03-08T01:08:59.82+00:00

    Hello @Swati Chothani - Welcome to MS Q&A!

    If I understood correctly, you're hitting the error message in your post when attempting to create an API Connection using a Service Account via the Outlook connector in your Logic Apps workflow.

    By default, the designer expects that you use the account that's signed in to the Azure portal which may be why you're hitting that error message. For creating connections based on Service Accounts (or accounts other than the one you currently signed in to Azure Portal), you'll need to either give the Service Account a Contributor role to your Logic Apps resource or alternatively, (b) set up the Service Account such that the account that you use to sign in to Portal has "Send As" permission. For more information, please review our documentation on this matter at the following: Connect using other accounts

    0 comments No comments