Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
5331a14
Update Copilot Agent Interactions Power BI template
sambetts Jan 4, 2026
4b377ef
Improve entity lookup to check local context before DB
sambetts Jan 9, 2026
a56b0e0
Merge branch 'dev' of https://github.com/pnp/Microsoft365-Analytics-I…
sambetts Jan 9, 2026
bf5aa80
Refactor ListBatchProcessor to be fully async and thread-safe
sambetts Jan 14, 2026
3ace37a
Add stress testing console app for O365 importer engine
sambetts Jan 14, 2026
b15535c
Make ListBatchProcessor usage fully async in UserAppLoader
sambetts Jan 14, 2026
a191b5d
Enable support for very large objects in .NET runtime
sambetts Jan 20, 2026
83301a1
Remove runbook task; add profiling PS scripts and docs
sambetts Jan 20, 2026
d6d81a9
Orphan class clean-up
sambetts Jan 20, 2026
e103083
Improve memory usage, prevent OOM in activity import
sambetts Jan 23, 2026
2f48d52
Handle null CopilotEventData when setting AppHost
sambetts Jan 26, 2026
cd1106d
Improve memory efficiency and robustness in audit import
sambetts Jan 27, 2026
0588083
Refactor UserMetadataUpdater: extract batch, license, mapping
sambetts Jan 27, 2026
2ee5f15
Improve lookup cache: prevent FK violations & handle duplicates
sambetts Jan 27, 2026
4f6b9b8
Add tests/docs for FK violation fix; EF LINQ query fixes
sambetts Jan 27, 2026
85a4e77
Copilot Activity Memory leak fix (#69)
sambetts Jan 27, 2026
cff900e
.
sambetts Jan 27, 2026
f1b1c0e
Fix EF duplicate key bug for user-manager imports
sambetts Jan 28, 2026
51d1a2a
Usermetadata refactor (#70)
sambetts Jan 28, 2026
356959b
Added missing models
sambetts Jan 29, 2026
f1fcf49
Refactor test to use consistent testRunId for lookups
sambetts Jan 29, 2026
3485bd2
Deprecate stats uploading and remove related logic
sambetts Feb 2, 2026
fc79763
Refactor UserMetadataUpdater tests, optimize batch logic
sambetts Feb 17, 2026
84c954b
Fix user import perf: replace per-user license lookup load + EF Remov…
sambetts Feb 18, 2026
7134554
Updated report template to include agent usage page & other UI fixes
sambetts Feb 19, 2026
7bdfd08
Fix user import perf: replace per-user license lookup load + EF Remov…
sambetts Feb 24, 2026
4243006
Bulk user update: add fast SQL path & perf tests
sambetts Feb 25, 2026
de7779b
Refactor user insert logic into UserInsertProcessor class
sambetts Feb 25, 2026
141522d
Improve logging and memory use in user import process
sambetts Feb 25, 2026
b918a6c
Enable basic publishing credentials for App Service
sambetts Feb 25, 2026
8da00d8
App Insights API Key Deprecation + Client-Side Updates (#73)
sambetts Feb 27, 2026
6dd892b
Add config check to CommentsCognitiveTests for Cognitive API
sambetts Feb 27, 2026
838e124
Refactor cognitive config check in stats loading
sambetts Feb 27, 2026
74d47eb
Require ApplicationId in AppInsights client tests
sambetts Feb 27, 2026
32a47e7
Add config check to cognitive stats test
sambetts Feb 27, 2026
0d50d99
Refactor logging to unified Logger, update version to 1.0.1.58
sambetts Feb 27, 2026
ffedea0
Add RBAC role assignment support for resource group security
sambetts Feb 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified reports/Copilot/Copilot Agent Interactions.pbit
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@
<ItemGroup>
<Compile Include="BaseInstallProcessClasses.cs" />
<Compile Include="InstallerLogs.cs" />
<Compile Include="InstallerTasks\JobTasks\CreateOrUpdateRunbookConfigureTask.cs" />
<Compile Include="InstallerTasks\JobTasks\ProfilingScriptsUploadToBlobStorageTask.cs" />
<Compile Include="InstallerTasks\JobTasks\AutomationAccountTask.cs" />
<Compile Include="ConfigureAzureComponentsTasks.cs" />
<Compile Include="InstallerTasks\JobTasks\RunbookCreateOrUpdateTasks.cs" />
<Compile Include="InstallerTasks\ResourceSecurityInstallJob.cs" />
<Compile Include="InstallerTasks\RunbooksInstallJob.cs" />
<Compile Include="Models\AzStorageConnectionInfo.cs" />
<Compile Include="SolutionUninstaller.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public ConfigureAzureComponentsTasks(SolutionInstallConfig config, ILogger logge
/// Install configure & software on App Service, update target DB.
/// </summary>
public async Task RunPostCreatePaaSTasks(WebSiteResource webApp, DatabasePaaSInfo dbInfo, StorageAccountResource storage, AutomationAccountResource automationAccount,
AppInsightsInfoWithApiAccess appInsights,
AppInsightsInfo appInsights,
RedisResource redis, CognitiveServicesInfo cognitiveServicesInfo,
KeyVaultResource keyVault, string serviceBusConnectionString, SubscriptionResource subscription)
{
Expand Down Expand Up @@ -130,7 +130,7 @@ async Task ConfigureWebApp(WebSiteResource webApp, DatabasePaaSInfo backendInfo,
StorageAccountResource storage,
RedisResource redis,
CognitiveServicesInfo cognitiveServicesInfo,
AppInsightsInfoWithApiAccess appInsights, string serviceBusConnectionString, KeyVaultResource keyVault)
AppInsightsInfo appInsights, string serviceBusConnectionString, KeyVaultResource keyVault)
{
// App settings
var url = $"https://{webApp.Data.HostNames.First()}/";
Expand All @@ -148,14 +148,6 @@ async Task ConfigureWebApp(WebSiteResource webApp, DatabasePaaSInfo backendInfo,
{
appSettings.Properties.Add("AppInsightsConnectionString", appInsights.ConnectionString);
}
if (!string.IsNullOrEmpty(appInsights?.ApiKey))
{
appSettings.Properties.Add("AppInsightsApiKey", appInsights.ApiKey);
}
if (!string.IsNullOrEmpty(appInsights?.AppId))
{
appSettings.Properties.Add("AppInsightsAppId", appInsights.AppId);
}

if (this.Config.CognitiveServicesEnabled)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ namespace App.ControlPanel.Engine.InstallerTasks
/// </summary>
public class AzurePaaSInstallJob : BaseAnalyticsSolutionInstallJob
{
private readonly GetOrCreateResourceGroupTask _rgCreateTask;
private readonly AutomationAccountTask _automationAccountTask;

private readonly SqlServerTask _sqlServerTask;
Expand All @@ -37,14 +38,19 @@ public class AzurePaaSInstallJob : BaseAnalyticsSolutionInstallJob

private readonly LogAnalyticsInstallTask _logAnalyticsInstallTask;
private readonly AppInsightsInstallTask _appInsightsInstallTask;
private readonly AppInsightsConfigureApiTask _appInsightsConfigureApiTask;
private readonly TextAnalyticsInstallTask _cognitiveServicesInstallTask;

/// <summary>
/// Add tasks in order for execution, some being chained
/// </summary>
public AzurePaaSInstallJob(ILogger logger, SolutionInstallConfig config, SubscriptionResource subscription) : base(logger, config, subscription)
{

var tagDic = config.Tags.ToDictionary();

_rgCreateTask = new GetOrCreateResourceGroupTask(TaskConfig.GetConfigForName(config.ResourceGroupName), logger, Location, tagDic, subscription);
this.AddTask(_rgCreateTask);

// Performance levels
var appPerfTier = AppServicePlanTask.PERF_TIER_BASIC1;
var sqlPerfTier = SqlDatabaseTask.PERF_TIER_BASIC;
Expand All @@ -55,8 +61,6 @@ public AzurePaaSInstallJob(ILogger logger, SolutionInstallConfig config, Subscri
appPerfTier = AppServicePlanTask.PERF_TIER_BASIC2;
}

var tagDic = config.Tags.ToDictionary();

// Web
var appServicePlanConfig = TaskConfig.GetConfigForName(config.AppServiceWebAppName).AddSetting(AppServicePlanTask.CONFIG_KEY_PERF_TIER, appPerfTier);
_appServicePlanTask = new AppServicePlanTask(appServicePlanConfig, logger, Location, tagDic);
Expand Down Expand Up @@ -132,8 +136,7 @@ public AzurePaaSInstallJob(ILogger logger, SolutionInstallConfig config, Subscri
var creds = new ClientSecretCredential(config.InstallerAccount.DirectoryId, config.InstallerAccount.ClientId, config.InstallerAccount.Secret);
var appInsightsConfig = TaskConfig.GetConfigForName(config.AppInsightsName);
_appInsightsInstallTask = new AppInsightsInstallTask(appInsightsConfig, logger, Location, tagDic, ResourceGroupName, config.Subscription.SubId, creds);
_appInsightsConfigureApiTask = new AppInsightsConfigureApiTask(appInsightsConfig, logger, Location, creds, _config.Subscription.SubId, ResourceGroupName);
this.AddTask(_logAnalyticsInstallTask, _appInsightsInstallTask, _appInsightsConfigureApiTask);
this.AddTask(_logAnalyticsInstallTask, _appInsightsInstallTask);

// Cognitive
if (config.CognitiveServicesEnabled)
Expand Down Expand Up @@ -166,7 +169,7 @@ public AzurePaaSInstallJob(ILogger logger, SolutionInstallConfig config, Subscri
public DatabasePaaSInfo DatabasePaaSInfo => new DatabasePaaSInfo(CreatedSqlServer, CreatedSqlDatabase, _config);
public RedisResource Redis => GetTaskResult<RedisResource>(_redisTask);
public StorageAccountResource Storage => GetTaskResult<StorageAccountResource>(_storageAccountInstallTask);
public AppInsightsInfoWithApiAccess AppInsights => GetTaskResult<AppInsightsInfoWithApiAccess>(_appInsightsConfigureApiTask);
public AppInsightsInfo AppInsights => GetTaskResult<AppInsightsInfo>(_appInsightsInstallTask);
public CognitiveServicesInfo CognitiveServicesInfo => _cognitiveServicesInstallTask != null ? GetTaskResult<CognitiveServicesInfo>(_cognitiveServicesInstallTask) : new CognitiveServicesInfo();
public ServiceBusQueueResourceWithConnectionString SBQueueWithConnectionString => GetTaskResult<ServiceBusQueueResourceWithConnectionString>(_serviceBusQueueWithPolicyInstallTask);
public KeyVaultResource KeyVault => GetTaskResult<KeyVaultResource>(_keyVaultTask);
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
using Azure.ResourceManager.Authorization;
using Azure.ResourceManager.Resources;
using CloudInstallEngine;
using CloudInstallEngine.Azure.InstallTasks;
using Common.Entities.Installer;
using Microsoft.Extensions.Logging;

namespace App.ControlPanel.Engine.InstallerTasks
{
/// <summary>
/// Secures resources in the resource group by assigning RBAC roles.
/// </summary>
public class ResourceSecurityInstallJob : BaseAnalyticsSolutionInstallJob
{
private readonly RoleAssignmentTask _appInsightsReaderRoleTask;

public ResourceSecurityInstallJob(ILogger logger, SolutionInstallConfig config, SubscriptionResource subscription) : base(logger, config, subscription)
{
var tagDic = config.Tags.ToDictionary();

// Assign Reader role to the runtime account on the resource group (covers App Insights and all resources)
var readerRoleConfig = TaskConfig.GetConfigForPropAndVal(RoleAssignmentTask.CONFIG_KEY_ROLE_NAME, "Reader")
.AddSetting(RoleAssignmentTask.CONFIG_KEY_CLIENT_ID, config.RuntimeAccountOffice365.ClientId)
.AddSetting(RoleAssignmentTask.CONFIG_KEY_CLIENT_SECRET, config.RuntimeAccountOffice365.Secret)
.AddSetting(RoleAssignmentTask.CONFIG_KEY_TENANT_ID, config.RuntimeAccountOffice365.DirectoryId)
.AddSetting(RoleAssignmentTask.CONFIG_KEY_PRINCIPAL_TYPE, "ServicePrincipal");

_appInsightsReaderRoleTask = new RoleAssignmentTask(readerRoleConfig, logger, Location, tagDic);
this.AddTask(_appInsightsReaderRoleTask);
}

public RoleAssignmentResource AppInsightsReaderRole => GetTaskResult<RoleAssignmentResource>(_appInsightsReaderRoleTask);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,17 @@ public async Task InstallOrUpdate()
var azureBackeEndCreationJob = new AzurePaaSInstallJob(_logger, Config, azureSub);
await azureBackeEndCreationJob.Install();

// Secure resources with RBAC roles
try
{
var resourceSecurityJob = new ResourceSecurityInstallJob(_logger, Config, azureSub);
await resourceSecurityJob.Install();
}
catch (Exception ex)
{
_logger.LogError($"Failed to assign RBAC roles: {ex.Message}. Continuing installation...");
}

// Run stuff now everything in Azure is created
var tasks = new ConfigureAzureComponentsTasks(Config, _logger, _ftpConfig, InstalledByUsername, _softwareConfig, _configPassword);
await tasks.RunPostCreatePaaSTasks(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@ The scripts are run after the database schema has been updated with Entity Frame

Note: SQL server doesn't normally support "```GO```" statements in stored procedures ("GO" is a SQL Server Management Studio thing to separate scripts in a single file), so you should avoid using them in your scripts here.
You *can* use the "GO" statement and the installer will split each segment by "GO" and then execute each segment (bit of a hack), but you should put the scripts in separate files or remove "GO" from any script here.

## Profiling Extensions
These scripts setup the SQL Server profiling extensions but are run by PS scripts found in /src/AnalyticsEngine/WebJob.Office365ActivityImporter/AutomationPS/ProfilingJobs/.

The main logic is in "usp_CompileWeekly" - a stored procedure that compiles weekly profiling data from daily profiling data.
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,6 @@
<Compile Include="MainForm.Designer.cs">
<DependentUpon>MainForm.cs</DependentUpon>
</Compile>
<Compile Include="NewSaltForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="NewSaltForm.Designer.cs">
<DependentUpon>NewSaltForm.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ProxyConfigForm.cs">
Expand Down Expand Up @@ -248,9 +242,6 @@
<EmbeddedResource Include="MainForm.resx">
<DependentUpon>MainForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="NewSaltForm.resx">
<DependentUpon>NewSaltForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
Expand Down
100 changes: 0 additions & 100 deletions src/AnalyticsEngine/App.ControlPanel/NewSaltForm.Designer.cs

This file was deleted.

28 changes: 0 additions & 28 deletions src/AnalyticsEngine/App.ControlPanel/NewSaltForm.cs

This file was deleted.

Loading