Skip to content

Fix the table microsoft365_user to populate all column value correctly and optimized the table performance by making API call based on the select statements#68

Merged
misraved merged 3 commits intomainfrom
fix-user-table-select-input
Oct 13, 2025
Merged

Fix the table microsoft365_user to populate all column value correctly and optimized the table performance by making API call based on the select statements#68
misraved merged 3 commits intomainfrom
fix-user-table-select-input

Conversation

@ParthaI
Copy link
Copy Markdown
Contributor

@ParthaI ParthaI commented Sep 17, 2025

Example query results

Results
> select license_details from microsoft365_user
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------>
| license_details                                                                                                                                                                                                                    >
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------>
| []                                                                                                                                                                                                                                 >
| []                                                                                                                                                                                                                                 >
| [{"id":"BD3b_WGtDEuvWikyonfSvMzrA6Tg-qJMjIx6kH_WwjU","service_plans":[{"applies_to":"User","provisioning_status":"PendingProvisioning","service_plan_id":"c948ea65-2053-4a5a-8a62-9eaaaf11b522","service_plan_name":"PURVIEW_DISCOV>
| ,"provisioning_status":"Success","service_plan_id":"8a256a2b-b617-496d-b51b-e76466e88db0","service_plan_name":"MFA_PREMIUM"},{"applies_to":"User","provisioning_status":"Success","service_plan_id":"41781fb2-bc02-4b7c-bd55-b576c0>
| "}],"sku_id":"f30db892-07e9-47e9-837c-80727f46fd3d","sku_part_number":"FLOW_FREE"},{"id":"BD3b_WGtDEuvWikyonfSvBhRVTtq2hhEiU998eIJaHA","service_plans":[{"applies_to":"Company","provisioning_status":"Success","service_plan_id":">
| dingProvisioning","service_plan_id":"0d0c0d31-fae7-41f2-b909-eaf4d7f26dba","service_plan_name":"Bing_Chat_Enterprise"},{"applies_to":"User","provisioning_status":"PendingProvisioning","service_plan_id":"f0ff6ac6-297d-49cd-be34->
| b05d533e1ea2","service_plan_name":"MICROSOFTBOOKINGS"},{"applies_to":"Company","provisioning_status":"Success","service_plan_id":"31cf2cfc-6b0d-4adc-a336-88b724ed8122","service_plan_name":"RMS_S_BASIC"},{"applies_to":"User","pr>
| id":"40b010bb-0b69-4654-ac5e-ba161433f4b4","service_plan_name":"DYN365_CDS_O365_P1"},{"applies_to":"Company","provisioning_status":"Success","service_plan_id":"94065c59-bc8e-4e8b-89e5-5138d471eaff","service_plan_name":"MICROSOF>
| ing_status":"Success","service_plan_id":"5e62787c-c316-451f-b873-1d05acd4d12c","service_plan_name":"BPOS_S_TODO_1"},{"applies_to":"User","provisioning_status":"Success","service_plan_id":"159f4cd6-e380-449f-a816-af1a9ef76344",">
| ioning_status":"Success","service_plan_id":"882e1d05-acd1-4ccb-8708-6ee03664b117","service_plan_name":"INTUNE_O365"},{"applies_to":"User","provisioning_status":"Success","service_plan_id":"e95bec33-7c88-4a70-8e19-b10bd9d0c014",>
| [{"id":"BD3b_WGtDEuvWikyonfSvMzrA6Tg-qJMjIx6kH_WwjU","service_plans":[{"applies_to":"User","provisioning_status":"Success","service_plan_id":"c948ea65-2053-4a5a-8a62-9eaaaf11b522","service_plan_name":"PURVIEW_DISCOVERY"},{"appl>
| [{"id":"BD3b_WGtDEuvWikyonfSvESO0s3jZ15Cvkxzf6somdM","service_plans":[{"applies_to":"User","provisioning_status":"PendingProvisioning","service_plan_id":"0d0c0d31-fae7-41f2-b909-eaf4d7f26dba","service_plan_name":"Bing_Chat_Ente>
| :"User","provisioning_status":"Success","service_plan_id":"a23b959c-7ce8-4e57-9140-b90eb88a9e97","service_plan_name":"SWAY"},{"applies_to":"Company","provisioning_status":"Success","service_plan_id":"882e1d05-acd1-4ccb-8708-6ee>
| []                                                                                                                                                                                                                                 >
| []                                                                                                                                                                                                                                 >
| [{"id":"BD3b_WGtDEuvWikyonfSvLnI3-AxlchOlLSf7COwX8g","service_plans":[{"applies_to":"Company","provisioning_status":"Success","service_plan_id":"b088306e-925b-44ab-baa0-63291c629a91","service_plan_name":"INSIGHTS_BY_MYANALYTICS>
| lies_to":"User","provisioning_status":"Success","service_plan_id":"dcf9d2f4-772e-4434-b757-77a453cfbc02","service_plan_name":"MESH_AVATARS_FOR_TEAMS"},{"applies_to":"User","provisioning_status":"Success","service_plan_id":"7547>
| R_VIRTUAL_AGENTS_O365_P1"},{"applies_to":"User","provisioning_status":"Success","service_plan_id":"0f9b09cb-62d1-4ff4-9129-43f4996f83f4","service_plan_name":"FLOW_O365_P1"},{"applies_to":"User","provisioning_status":"Success",">
| 5b","service_plan_name":"MCO_TEAMS_IW"},{"applies_to":"User","provisioning_status":"Success","service_plan_id":"743dd19e-1ce3-4c62-a3ad-49ba8f63a2f6","service_plan_name":"STREAM_O365_E1"},{"applies_to":"User","provisioning_stat>
| -89c3-182f06f82e5c","service_plan_name":"EXCHANGE_S_STANDARD"},{"applies_to":"User","provisioning_status":"Success","service_plan_id":"bed136c6-b799-4462-824d-fc045d3a9d25","service_plan_name":"CDS_O365_P1"}],"sku_id":"e0dfc8b9>
| ,"provisioning_status":"Success","service_plan_id":"159f4cd6-e380-449f-a816-af1a9ef76344","service_plan_name":"FORMS_PLAN_E1"},{"applies_to":"Company","provisioning_status":"Success","service_plan_id":"113feb6c-3fe4-4440

…y and optimized the table performance by making the selected columns based on the select statements
@ParthaI ParthaI requested a review from Copilot September 17, 2025 18:29
@ParthaI ParthaI self-assigned this Sep 17, 2025
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes the Microsoft365 user table to properly populate all column values and optimizes performance by building selective field queries based on the SQL SELECT statements. The main issue was that the license_details column was returning empty arrays, and various profile fields were not being populated correctly.

  • Adds selective field querying to only request needed columns from Microsoft Graph API
  • Implements proper license details retrieval via dedicated hydrate function
  • Optimizes expensive profile fields (birthday, interests, etc.) with hydrate functions

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread microsoft365/table_microsoft365_user.go Outdated
Comment thread microsoft365/table_microsoft365_user.go Outdated
Comment thread microsoft365/table_microsoft365_user.go Outdated
Comment thread microsoft365/table_microsoft365_user.go Outdated
@ParthaI ParthaI requested a review from misraved September 17, 2025 18:36
@ParthaI ParthaI changed the title Fix the table microsoft365_user to populate all column value correctly and optimized the table performance by making the selected columns based on the select statements Fix the table microsoft365_user to populate all column value correctly and optimized the table performance by making API call based on the select statements Sep 18, 2025
@misraved misraved merged commit 7855333 into main Oct 13, 2025
1 check passed
@misraved misraved deleted the fix-user-table-select-input branch October 13, 2025 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants