microsoft / coe-starter-kit

Other
747 stars 219 forks source link

[CoE Starter Kit - QUESTION] Admin | Sync Template v3 (Custom Connectors) - Get Custom Connectors as Admin NotFound #2619

Closed rfolgadoal closed 2 years ago

rfolgadoal commented 2 years ago

What is your question?

Admin | Sync Template v3 (Custom Connectors)

In the container "Get Custom Connectors and store them in CoE CDS Entity" and the action "Get Custom Connectors as Admin" returns the message: "error": { "message": " The request failed with client error: 'The environment '' could not be found in the tenant: 'XXXXX' " }

FlowError-CustomConnectors

)

I have looked in the Environments table, and this environment exists.

What solution are you experiencing the issue with?

Core

What solution version are you using?

3.37

What app or flow are you having the issue with?

Admin | Sync Template v3 (Custom Connectors)

Jenefer-Monroe commented 2 years ago

Please scroll up to the trigger, and find this property in the return : admin_environmentcdsinstanceurl Can you browse to it as the identity running the flow? image

Get the display name from that same trigger return value. Browse to the admin pages https://admin.powerplatform.microsoft.com/environments Do you see the environment there?

rfolgadoal commented 2 years ago

Ok, I see. The environment was deleted by the owner, but this record has not updated as deleted in the Environment table. What should we do? Should we change the CLEANUP - Admin | Sync Template v3 (Check Deleted) flow recurrence? (I think this flow updates the delete status of each environment, right?)

Jenefer-Monroe commented 2 years ago

Thanks for investigating so quickly with me! :)

This should not occur again with the run of the main driver flow Admin | Sync Template v3 as that only ends up updating environment records for existing environments. So this repro'd either as a timing issue (user deleted the environment after the flow started) or someone is manually updating the records in the CoE inventory.

You can change the recurrence of Check Deleted but that will give you an unmanaged layer and so you will need to reapply each upgrade. And chech deleted is resource intensive so you likely can't run it every day anyway.

Above all, this shouldn't be necessary per the above. Please let me know if you see this repro again in the normal course of running the kit (aka in tomorrow's run of Admin | Sync Template v3 )

rfolgadoal commented 2 years ago

That environment record has not been updated as deleted in the Environment table. So, I have checked the latest run of Admin | Sync Template v3 flow, and it looks like it is updating the existing environments but not the deleted ones. I go to the Delete environments view in the Power Platform Admin View app. There are no environments deleted from two weeks ago (the last run of the CLEANUP - Admin | Sync Template v3 (Check Deleted) flow). Does that make sense?

Jenefer-Monroe commented 2 years ago

Make sure you don't have any unmanaged layers on CLEANUP - Admin | Sync Template v3 (Check Deleted) and run it. Per the conversation above this environment was deleted recently. So I would expect it to get marked deleted next time the clean ups run

Jenefer-Monroe commented 2 years ago

closing out as no further action for starter kit team