Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Error Importing solution with flows using Office 365 Outlook connector

I have a solution with custom CDS entities and a number of flows running in a sandbox environment. When I export the solution and try to import it into a new environment, I get the following error:


ErrorCode: 0x80040216
Flow client error returned with status code "BadRequest" and details "{"error":{"code":"FlowMissingConnection","message":"The flow is missing a connection for api 'shared_office365'. Reauthenticate the connection or remove from the flow and re-save."}}"

(found in the Import log file under 'Workflow Activation')


Everything is working fine in my source environment, and I have been exporting and importing my solution from one environment to another several times before without getting any errors, and with all my flows running OK right after the import has completed - without having to do anything.


However, I noticed that this error started to appeared, after I have added flows to my solution that uses the Office 365 Outlook connector to run the action 'Send an email from a shared mailbox (V2)'.
(until then I didn't use this connector in my solution)


I have tried to create a connection to the 'Office 365 Outlook' connector in the target environment before importing the solution, but I still get the error.


My expectation is that when I have created the connections in the target environment before importing the solution, then the import job will automatically wire-up my flows to use the connections already available in the environment. Only if I don't do that would I expect to get the error.


Am I wrong to assume this?


In order to make the flows work after importing, you have to open them, one at a time, and click Edit to start editing. Then you see a message: "This flow will connect to:", then a list of connections, and a "Continue" button (see screenshot). You have to click the "Continue" button, then "Save" your changes to the flow, and finally you need to "Turn on" the flow (and if you have any parent-flows that call any of the failed flows, then you also need to fix them).

- You will not be able to do this fix unless your solution is unmanaged. 




Hello @mbk 


I might be equivocated but as far as I am aware of, when you import a solution flow the connection is stripped from the flow definition and the flow needs to be re-patched with a new or existing connection.


However you mentioned it was working before right? What connector did you have in the flows when the solution importing was being done fine? Do you recall, was it only CDS one?



Helpful resources

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.


Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Users online (7,020)