Closed FacilyDev closed 8 months ago
I have just confirmed that deleted works correctly in that flow. We do compare "Name" which includes the default.
Please go to the most recent run of CLEANUP - Admin | Sync Template v4 (Check Deleted) Is the default envt returned in this call?
And if its not, can you please go see if the identity running the flow is shown as a sys admin for the default envt?
Yes, default is returned in this step, however with capital "D" -- name starts with Default-
Oh I see, thats the bug. The dataflow should not be writing it like that. Let me take a look at how easy this is to fix.
Hang on! But you don't use dataflow but use action directly from the Platform (which I find strange to be honest).
Thats just for the delete case. When we insert these environments its from the datalake, which unfortunately calls these ents with an lower case name. (default-abc123...) unlike the rest of the product which returns them with upper case (Default-abc123...)
The datalake doesnt give us the needed information for checking for delete.
Go to your Dataflows and edit the Environment Dataflow
Select Environments > Advanced Editor
Replace what is there with the below:
let Source = AzureStorage.DataLake(DatalakeURL & "/powerapps/environments"), excludehiddenfiles = Table.SelectRows(Source, each [Attributes]?[Hidden]? <> true), excludezerolengthfiles = Table.SelectRows(excludehiddenfiles, each [Attributes]?[Size]? > 0),
// Strip out Legacy-/Default- from Environment ID
// Add a column with timestamp
// true/false if the environment has CDS
// If environment created by SYSTEM
Custom = Table.ReplaceValue(#"Replace IsOrphan flag for SYSTEM environments", "default-", "Default-", Replacer.ReplaceText, {"environmentId"}) ,
// Get additional meta data for environments from the ListEnvironmentsAPI
in
Except the step above should I also remove [Deleted] mark in Environments table and remove DataflowRefreshHistory records as described in #7511 or just definition of Environments dataflow will rectify the situation?
I can confirm it worked only after editing dataflow. Hopefully, the flow "check deleted" will not mess up tomorrow 🙂 Thanks for lightning-fast help (very unusual by MS support and without fiddler log required 😉)
You were the 3rd person to raise this so you were a virutal fiddler log with your observations hitting me just right :) Happy to help, thank you so much for validating!!
@Jenefer-Monroe, after performing the above fix, our PowerBI dashboard is now showing less number of PowerApps. Admin View is showing 10k+ items compared to the PowerBI report - it is now only showing 2k+ items. Do you have any idea why this is the case?
Checking the number, it seems that it is not getting the number of PowerApps in the default environment and it is not showing in PowerBI Report.
@Jenefer-Monroe, when I noticed the same was happening in my environment and I replaced the query in Advanced Editor in my Environments Dataflow, I now get:
---------- Message ---------- Expression.Error: A cyclic reference was encountered during evaluation.
---------- Session ID ---------- 8b3f1c1a-4cdb-44bb-893c-91ccfbc8dbfc
---------- Request ID ---------- eb10cc1a-9cfa-4f74-ae5f-fa6528aec888
---------- Mashup script ---------- section Section1; shared #"Transform file (4)" = let Source = AzureStorage.DataLake(DatalakeURL & "/powerapps/environments"), excludehiddenfiles = Table.SelectRows(Source, each [Attributes]?[Hidden]? <> true), excludezerolengthfiles = Table.SelectRows(excludehiddenfiles, each [Attributes]?[Size]? > 0),
// Strip out Legacy-/Default- from Environment ID
// Add a column with timestamp
// true/false if the environment has CDS
// If environment created by SYSTEM
Custom = Table.ReplaceValue(#"Replace IsOrphan flag for SYSTEM environments", "default-", "Default-", Replacer.ReplaceText, {"environmentId"}) ,
// Get additional meta data for environments from the ListEnvironmentsAPI
in
shared #"Sample file (4)" = let Source = AzureStorage.DataLake(DatalakeURL & "/powerapps/environments"),
Navigation = #"Filtered hidden files"{0}[Content]
in Navigation; shared #"Parameter (4)" = let Parameter = #"Sample file (4)" meta [IsParameterQuery = true, IsParameterQueryRequired = true, Type = type binary] in Parameter; [Description = "Environment Web API endpoint. Get via make.powerapps.com > Settings Cog > Developer resources > Web API Endpoint value (example https://mycoe.api.crm.dynamics.com/api/data/v9.2)"] shared EnvironmentAPI = let EnvironmentAPI = "https://pplatcoe.crm.dynamics.com/api/data/v9.2" meta [IsParameterQuery = true, IsParameterQueryRequired = true, Type = type any] in EnvironmentAPI; shared DatalakeURL = let DatalakeURL_Apps = "https://exptenantanalytics.dfs.core.windows.net/powerplatform" meta [IsParameterQuery = true, IsParameterQueryRequired = true, Type = type any] in DatalakeURL_Apps; shared admin_makers = let Source = OData.Feed(#"EnvironmentAPI", null, [Implementation = "2.0"]),
#"Removed columns" = Table.RemoveColumns(#"Navigation 1", {"utcconversiontimezonecode", "admin_m2managerprinciplename", "modifiedon", "admin_lastpulsesurvey", "admin_preferredlanguage", "admin_numberofuiflows_state", "admin_numberofcustomconnectors", "admin_numberofsharepointapps_date", "admin_numberofpvas_date", "admin_userisserviceprinciple", "admin_numberofflows_date", "admin_country", "admin_numberofpvas_state", "importsequencenumber", "admin_numberofcustomconnectors_date", "admin_numberofuiflows", "admin_numberofuiflows_date", "timezoneruleversionnumber", "admin_photoobject", "admin_numberofflows_state", "admin_numberofenvironments_state", "admin_department", "admin_jobtitle", "admin_managerid", "_owningteam_value", "admin_numberofenvironments", "admin_city", "_owninguser_value", "admin_managerprinciplename", "_modifiedby_value", "admin_accountenabled", "admin_numberofenvironments_date", "admin_photoobject_url", "admin_numberofflows", "admin_office", "admin_numberofapps", "admin_numberofcanvasapps", "admin_numberofcanvasapps_state", "overriddencreatedon", "versionnumber", "_createdby_value", "admin_numberofsharepointapps", "_owningbusinessunit_value", "admin_numberofcanvasapps_date", "admin_photoobject_timestamp", "statecode", "admin_numberofapps_date", "admin_numberofpvas", "statuscode", "admin_photoobjectid", "_ownerid_value", "admin_photo", "admin_numberofapps_state", "admin_numberofcustomconnectors_state", "_modifiedonbehalfby_value", "admin_numberofsharepointapps_state", "_createdonbehalfby_value", "admin_numberofmodeldrivenapps_date", "createdon", "admin_company", "admin_numberofmodeldrivenapps", "admin_numberofmodeldrivenapps_state", "createdby", "createdonbehalfby", "modifiedby", "modifiedonbehalfby", "owninguser", "owningteam", "ownerid", "owningbusinessunit", "admin_maker_SyncErrors", "admin_maker_DuplicateMatchingRecord", "admin_maker_DuplicateBaseRecord", "admin_maker_AsyncOperations", "admin_maker_MailboxTrackingFolders", "admin_maker_ProcessSession", "admin_maker_BulkDeleteFailures", "admin_maker_PrincipalObjectAttributeAccesses", "admin_admin_bpf_maker", "admin_admin_solution_SolutionCreator_admin_make", "admin_App_AppOwner_admin_Maker", "admin_EnvironmentMaker", "admin_Flow_DerivedOwner_admin_Maker", "admin_Flow_FlowCreator_admin_Maker", "admin_portal_PortalOwner_admin_Maker", "admin_PVA_PVAOwner_admin_Maker", "admin_rel_ConnectorMaker", "admin_RPA_RPAOwner_admin_Maker", "coe_EnvCreationRequest_SystemAdmins", "admin_admin_aibuildermodel_AiCreator_admin_make"})
in
shared Environments = let Source = AzureStorage.DataLake(DatalakeURL & "/powerapps/environments"), excludehiddenfiles = Table.SelectRows(Source, each [Attributes]?[Hidden]? <> true), excludezerolengthfiles = Table.SelectRows(excludehiddenfiles, each [Attributes]?[Size]? > 0),
// Strip out Legacy-/Default- from Environment ID
// Add a column with timestamp
// true/false if the environment has CDS
// If environment created by SYSTEM
Custom = Table.ReplaceValue(#"Replace IsOrphan flag for SYSTEM environments", "default-", "Default-", Replacer.ReplaceText, {"environmentId"}),
// Get additional meta data for environments from the ListEnvironmentsAPI
in
shared ListEnvironmentsAPI = let Source = Json.Document(Web.Contents("https://api.bap.microsoft.com/providers/Microsoft.BusinessAppPlatform/scopes/admin/environments?api-version=2020-10-01")),
in
You may need to delete run history, perhaps its matching to the old casing.
@Jenefer-Monroe, after performing the above fix, our PowerBI dashboard is now showing less number of PowerApps. Admin View is showing 10k+ items compared to the PowerBI report - it is now only showing 2k+ items. Do you have any idea why this is the case?
Checking the number, it seems that it is not getting the number of PowerApps in the default environment and it is not showing in PowerBI Report.
I did not test or make this change in the PBI's dataflow, only in the dataflow which feeds the dataverse tables.
Thanks for replying Jenefer! I tried clearing out the Dataflow refresh history table. It didn't make any difference. In case it helps, my query seems to error on this transform action on the 4th step of the query.
[cid:79e0df9a-c59e-4795-b8df-65ed1eadbfe9]
[cid:b82a5501-08b7-4136-8261-f5e718211574]
Bart Sneary
MTC Architect | 952-837-4560 W or 507-403-3088 M
@.**@.>
3601 West 76th St, Suite 600, Edina, MN 55435 | www.microsoft.com/mtchttp://www.microsoft.com/mtc
[cid:903343cc-3dca-4369-910a-add69b8ddb1a]
From: Jenefer Monroe @.> Sent: Monday, February 5, 2024 1:51 PM To: microsoft/coe-starter-kit @.> Cc: Bart Sneary @.>; Comment @.> Subject: Re: [microsoft/coe-starter-kit] Data Export : Default Environment keeps getting marked as deleted (Issue #7562)
You may need to delete run history, perhaps its matching to the old casing.
— Reply to this email directly, view it on GitHubhttps://github.com/microsoft/coe-starter-kit/issues/7562#issuecomment-1927964301, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJ645VFQSEUZDDI67WZG4JLYSEZ3BAVCNFSM6AAAAABCRBSE3OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRXHE3DIMZQGE. You are receiving this because you commented.Message ID: @.***>
@Bart are you editing the Dataflow that is used for the PBI or the Dataflow that is used for bringing the data into the envt?
This is the only Dataflow I edited
Or (your picture did not come through) are you saying that is what you editted and you failed at this step?
I was trying to edit the Dataflow bringing the data from the lake into Dataverse.
[cid:1a070ffb-5cf7-4967-8115-441f8a86ebd4]
Bart Sneary
MTC Architect | 952-837-4560 W or 507-403-3088 M
@.**@.>
3601 West 76th St, Suite 600, Edina, MN 55435 | www.microsoft.com/mtchttp://www.microsoft.com/mtc
[cid:cb741157-d2f9-48ae-ba75-1fe1abc71e57]
From: Jenefer Monroe @.> Sent: Tuesday, February 6, 2024 7:38 AM To: microsoft/coe-starter-kit @.> Cc: Bart Sneary @.>; Comment @.> Subject: Re: [microsoft/coe-starter-kit] Data Export : Default Environment keeps getting marked as deleted (Issue #7562)
@barthttps://github.com/bart are you editing the Dataflow that is used for the PBI or the Dataflow that is used for bringing the data into the envt?
— Reply to this email directly, view it on GitHubhttps://github.com/microsoft/coe-starter-kit/issues/7562#issuecomment-1929439869, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJ645VDOS6SAU2VQA4H26P3YSIP3DAVCNFSM6AAAAABCRBSE3OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRZGQZTSOBWHE. You are receiving this because you commented.Message ID: @.***>
Yes! That last cell on that row shows "Error"
[cid:39aae894-e03f-4293-8b44-a8f332fc2e8b]
Bart Sneary
MTC Architect | 952-837-4560 W or 507-403-3088 M
@.**@.>
3601 West 76th St, Suite 600, Edina, MN 55435 | www.microsoft.com/mtchttp://www.microsoft.com/mtc
[cid:ab3b56e0-7b83-4897-9772-2e84428f53cf]
From: Jenefer Monroe @.> Sent: Tuesday, February 6, 2024 7:47 AM To: microsoft/coe-starter-kit @.> Cc: Bart Sneary @.>; Comment @.> Subject: Re: [microsoft/coe-starter-kit] Data Export : Default Environment keeps getting marked as deleted (Issue #7562)
Or (your picture did not come through) are you saying that is what you editted and you failed at this step? image.png (view on web)https://github.com/microsoft/coe-starter-kit/assets/89584709/1ed7881b-0ac2-49be-b285-0a468757da90
— Reply to this email directly, view it on GitHubhttps://github.com/microsoft/coe-starter-kit/issues/7562#issuecomment-1929455465, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJ645VF3EV2C77GYI3BBO4LYSIQ5PAVCNFSM6AAAAABCRBSE3OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRZGQ2TKNBWGU. You are receiving this because you commented.Message ID: @.***>
ok we have seen that before, I believe it was because the flow files were malformatted
Please go to the Datalake and find the flow file for an environment where you expect to see flows but do not. You can do this by going to the Storage Browser and searching for the GUID of the envt
Image 1 : Well formatted
Image 2 : Not well formatted
Jenefer,
I didn't look through all environments, but did check Personal Productivity (that has no record right now in the COE Kit Admin App, so no Flows show up either). I also checked about 30 others going back from today in descending last modified date order from the data lake. All were well formatted.
I'm fine waiting until tomorrow when the Feb update comes out, updating everything to the latest versions and seeing if the default environment keeps getting deleted after that as part of the BYODL processes. If it matters, according to audit logs, this started happening on 1-8-24. I know I updated all the Dataflow definitions the last time I installed the kit and all set up fine as I set things up. I thought that was on 1-4 or 1-5. It's kinda weird that all the Dataflows last published dates show in the tool tonight as 3-14-23.
Refreshing the Dataflows manually seems to bring it back, but the next automated run seems to make it disappear again.
Bart
From: Jenefer Monroe @.> Sent: Tuesday, February 6, 2024 10:57 AM To: microsoft/coe-starter-kit @.> Cc: Bart Sneary @.>; Comment @.> Subject: Re: [microsoft/coe-starter-kit] Data Export : Default Environment keeps getting marked as deleted (Issue #7562)
ok we have seen that before, I believe it was because the flow files were malformatted
Please go to the Datalake and find the flow file for an environment where you expect to see flows but do not. You can do this by going to the Storage Browser and searching for the GUID of the envt image.png (view on web)https://github.com/microsoft/coe-starter-kit/assets/89584709/160575cf-225f-4d31-b7db-88fc079f3ed7
Is the file formatted like image 1 with a single line per flow or like image 2 with a jumbled look?
Image 1 : Well formatted image.png (view on web)https://github.com/microsoft/coe-starter-kit/assets/89584709/dbf210ec-8544-4e82-a03e-e6196f0685fc
Image 2 : Not well formatted image.png (view on web)https://github.com/microsoft/coe-starter-kit/assets/89584709/589de3df-db6c-4101-ba16-05fd530c56c0
— Reply to this email directly, view it on GitHubhttps://github.com/microsoft/coe-starter-kit/issues/7562#issuecomment-1930360256, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJ645VDU6KDGAFGJYLM5CZTYSJOHFAVCNFSM6AAAAABCRBSE3OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZQGM3DAMRVGY. You are receiving this because you commented.Message ID: @.***>
Great lets do that. And if you have an issue please post a new one and just reference this as it will close when we ship.
Does this bug already exist in our backlog?
Describe the issue
For several days I'm having an issue that our Default environment is marked as deleted. I tried few times to manually uncheck [Deleted] and remove [Date of deletion] in Environments table but the next day it again gets marked as deleted with new date. As my source is data lake I checked environments.json but this environment is there and is Active. All dataflows refresh correctly.
I'm not sure if it has something to do with the fact that EnvId field doesn't have default- in the beginning (EnvName field has it) and it 's not possible to change it manually.
Expected Behavior
Default environment must be visible with all the Flows / Apps as it is the most used environment in our tenant.
What solution are you experiencing the issue with?
Core
What solution version are you using?
4.22
What app or flow are you having the issue with?
Probably it is this one: [CLEANUP - Admin | Sync Template v4 (Check Deleted)]
What method are you using to get inventory and telemetry?
Data Export
Steps To Reproduce
No response
Anything else?
No response
AB#2165