Repository navigation
Add Microsoft 365 profile coverage to FlightCheck (Graph beta) - #492
Vincent Wong (wongvincent) wants to merge 17 commits into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: f1fdfd99-7cc6-4fba-b752-bd00cebe442b
Check the signed-in profile with User.Read when tenant access is unavailable, clearly distinguish own-profile availability from tenant coverage, and preserve other Graph checks and the shared read budget. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: f1fdfd99-7cc6-4fba-b752-bd00cebe442b
|
@microsoft-github-policy-service agree company="Microsoft" |
| if limit <= 0 or time_budget <= 0: | ||
| raise ValueError("Collection limit and time budget must be positive.") | ||
| with self._bounded_errors(time_budget): | ||
| return asyncio.run(self._bounded_collection(path, params, limit, time_budget)) |
There was a problem hiding this comment.
The 30-second limit can still be exceeded when DNS is slow. asyncio.run() waits for the DNS lookup to finish even after the request is cancelled. Please make both tenant and own-profile reads return when the deadline expires.
Isolate bounded Graph DNS lookups in cancellable helper processes so tenant and own-profile reads do not wait for blocked resolver threads during shutdown. Verify the signed-in account and token tenant before profile reads, and cover deadline cleanup and tenant mismatches with regressions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: f1fdfd99-7cc6-4fba-b752-bd00cebe442b
Resolve the shared registry test conflict by retaining both Entra coverage parity tests and the upstream standalone FlightCheck report test. Preserve upstream setup, telemetry and report-path changes alongside the profile coverage, DNS deadline and tenant identity fixes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: f1fdfd99-7cc6-4fba-b752-bd00cebe442b
Preserve upstream constructor-provided Graph scopes and person-search support while retaining explicit sign-in scope overrides and consent-aware authentication. Add regressions covering constructor defaults and explicit overrides for silent and interactive sign-in. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: f1fdfd99-7cc6-4fba-b752-bd00cebe442b
Use constructor-only Graph scopes, consolidate bounded HTTP and cancellable DNS behind one transport, and supply identity-bound self-profile clients from CLI/DA setup instead of the generic runner. Preserve existing permission, retry, deadline and report behavior. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: f1fdfd99-7cc6-4fba-b752-bd00cebe442b
Replace Entra-only coverage with public Graph beta rich-profile reads. Check identity and employment fields plus standard profile sections across at most 100 Member users, batch up to 20 reads, preserve the 30-second budget and own-profile fallback, and mark source conflicts or omissions unverified instead of empty. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: f1fdfd99-7cc6-4fba-b752-bd00cebe442b
Describe supported profile data sources and availability checks directly, without internal retrieval-investigation wording. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: f1fdfd99-7cc6-4fba-b752-bd00cebe442b
Share retry scheduling, isolate batch validation, and remove unused profile selection plumbing. Compare colleague collections independent of order while preserving genuine conflicts. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: f1fdfd99-7cc6-4fba-b752-bd00cebe442b
Keep beta endpoint and API-version labels while removing the production-support disclaimer from reports and documentation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: f1fdfd99-7cc6-4fba-b752-bd00cebe442b
Remove unsupported and Graph-only checks, count only work-anniversary dates, and document shared properties and separate-resource exclusions in the spec. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: f1fdfd99-7cc6-4fba-b752-bd00cebe442b
Require a real relationship identity instead of counting labels as profile data. Preserve authentication and malformed-response errors when another batch request is forbidden. Add regression coverage and clarify the beta URL constant name. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: f1fdfd99-7cc6-4fba-b752-bd00cebe442b
Avoid competing request timeouts converting operation cancellation into retries. Isolate TLS initialization from DNS timing assertions while preserving cancellation and worker cleanup checks. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: f1fdfd99-7cc6-4fba-b752-bd00cebe442b
Use public ODS, Entra and Graph contracts. Remove separate given-name, surname, relationship, date and enrichment checks; require actual primary/work email data and ignore unselected properties. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: f1fdfd99-7cc6-4fba-b752-bd00cebe442b
State that the approved twelve checks cover a subset of Microsoft 365 People Profile, and link ODS attributes, Entra attributes and profile data-source guidance. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: f1fdfd99-7cc6-4fba-b752-bd00cebe442b
Describe the current expandable property subset and ingestion guidance without obsolete comparisons or exclusion lists. Count any nonblank email address regardless of its type. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: f1fdfd99-7cc6-4fba-b752-bd00cebe442b
Keep the scope description focused on ESS personalization. Distinguish v1.0 user-ID enumeration from beta profile reads. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: f1fdfd99-7cc6-4fba-b752-bd00cebe442b
|
One thing to fix before merging: the legacy Dataverse-backed full/authentication path still calls With two accounts cached in the same tenant, Graph can silently pick account B when account A was requested. The profile check then reports an account-mismatch error and fails the run, even though A has valid cached credentials. Please pass the requested account into Graph authentication on this path as well, keeping the identity check in place. A regression test with two cached accounts and the requested account second would cover this. Relevant code: |
Description
Adds
AUTH-PROFILE-001to check availability of a subset of Microsoft 365 People Profile attributes that assist with ESS personalization.Properties checked: display name, UPN, email, job title, employment type, department, company name, office location, workplace country, employee ID, company code and cost center.
How it works
/users, then reads beta/users/{id}/profilein read-only batches of 20. Capped scans are labelled as samples.User.Read.Allfor tenant scans. Permission-only failures fall back to/beta/me/profilewithUser.Read, labelled Own profile only.Other changes
graph_transport.pyand adds consent-aware Graph scopes and account/tenant validation.Testing
Regression coverage includes profile availability, consent/fallback, identity checks, batching/retries, deadlines/DNS cleanup and reporting. Tests and lint passed; live API probes exercised own-profile and tenant reads.