microsoft / coe-starter-kit

Other
743 stars 219 forks source link

[CoE Starter Kit - BUG] Ignore environments with Disabled Runtime State from inventory flows #7846

Closed bhupendra14 closed 5 months ago

bhupendra14 commented 6 months ago

Does this bug already exist in our backlog?

Describe the issue

Getting multiple flow failures because of Dynamics access is disable and we cant enable it because anything to do with Dynamics environments we don't touch in our platform, but its also worth mentioning to the CoE developers this error because they should probably ignore the environment ????

image

image

Expected Behavior

No response

What solution are you experiencing the issue with?

Core

What solution version are you using?

4.24

What app or flow are you having the issue with?

Admin | Sync Template v3 (Solutions)

What method are you using to get inventory and telemetry?

Cloud flows

Steps To Reproduce

No response

Anything else?

The Dynamics 365 organization you are attempting to access is currently disabled. Please contact your system administrator.

AB#2564

Jenefer-Monroe commented 6 months ago

Can you please go to the product's admin pages > environments > find one of the environments that is failing here and click to open it > Details > See All What does it show for the Type, Administration Mode, and State? https://admin.powerplatform.microsoft.com/environments image

bhupendra14 commented 6 months ago

Hi @Jenefer-Monroe , sure. Please see the details below.

image

Jenefer-Monroe commented 6 months ago

sorry I dont mean for your CoE environment, I mean for the envt that is failing here. You can look in the trigger and it will show you what envt it is image image

bhupendra14 commented 6 months ago

@Jenefer-Monroe Yeah, it for the same environment which I shared above.

Jenefer-Monroe commented 6 months ago

Can you open this to see which action is failing? image

bhupendra14 commented 6 months ago

Sorry @Jenefer-Monroe , it's my bad, actually it's failing for different environment which is Disabled. I missed it.

But can't we just ignore the environment name from the flow to avoid this error.

image

image

Jenefer-Monroe commented 6 months ago

I'm not sure what you mean by envt name. In order for me to help fix in the kit I will need to be able to find a way to identify this generally. Can you please share, are you able to see these properties for this envt still? That will help me know how to map the properties. https://admin.powerplatform.microsoft.com/environments image

bhupendra14 commented 6 months ago

I got it, it might be because of environment disability.

image

bhupendra14 commented 6 months ago

So if you can ignore this type of inactive environments in the flow so it won't fail and give us so much error messages. 😒

Jenefer-Monroe commented 6 months ago

Can you find the environment in the inventory (via the Power Platform Admin View app) and see what properties it has for these fields? image

bhupendra14 commented 6 months ago

sure @Jenefer-Monroe , please check this

image

Jenefer-Monroe commented 6 months ago

How about Environment Runtime State?

bhupendra14 commented 6 months ago

it's disable

image

Jenefer-Monroe commented 6 months ago

ok great. We can use this as our flag to ignore then. Thanks for helping me debug. Easy fix for April.

Jenefer-Monroe commented 6 months ago

Can you please tell me, does it fail for these flows too? I'm wondering if its just the ones we use the dataverse connector for that need fixed up:

bhupendra14 commented 6 months ago

Thanks for the help.

No it's working absolutely fine for above both. 😊

Jenefer-Monroe commented 6 months ago

Most were as simple as adding this to the early exit condition: Image

These two will need a little something more. Admin | Sync Template v4 (Desktop Flow - Runs) Admin | Sync Template v4 (PVA Usage)

Jenefer-Monroe commented 6 months ago

Can you please try these two for me?

Admin | Sync Template v4 (Desktop Flow - Runs)

Put this:

admin_environmentdeleted eq false and admin_excusefrominventory eq false and admin_environmentruntimestate ne 'Disabled'

Here: Image

Admin | Sync Template v4 (PVA Usage)

Put this: admin_pvadeleted eq false and _admin_pvaenvironment_value ne null and admin_PVAEnvironment/admin_environmentdeleted ne true and admin_PVAEnvironment/admin_environmentruntimestate ne 'Disabled'

Here:

Image

bhupendra14 commented 6 months ago

Hi, unfortunately I do not currently have a trial instance, and I am unable to test it in production. I apologize, I wish I could have been of more assistance. 😐

Jenefer-Monroe commented 6 months ago

No problem. I feel pretty confident there. Here is another flow I missed though: This filter: @and(not(equals(item()?['properties/states/runtime/id'], 'Disabled')), not(equals(item()?['properties/linkedEnvironmentMetadata/instanceUrl'], null)))

Here: image

bhupendra14 commented 6 months ago

Thanks @Jenefer-Monroe for the help and quick support. 😊