Skip to content

Add Workday hybrid flow authorization - #279

Draft
Mukesh Chaudhary (mukesh4139) wants to merge 3 commits into
mainfrom
users/mukesh4139/workday-hybrid-flow-enabling-script
Draft

Mukesh Chaudhary (mukesh4139) wants to merge 3 commits into
mainfrom
users/mukesh4139/workday-hybrid-flow-enabling-script

Conversation

@mukesh4139

@mukesh4139 Mukesh Chaudhary (mukesh4139) commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add /connect workday-hybrid routing and a stateless Dataverse authorization utility
  • create or reuse delegated authorization and access-team records, then grant workflow access
  • require explicit environment selection and Microsoft account authentication before changes
  • surface sanitized Dataverse diagnostics, including request IDs and service error details

Validation

Automated

  • python -m pytest tests/scripts/test_auth.py tests/scripts/test_discover.py tests/scripts/test_enable_workday_hybrid_flow_authorization.py tests/setup/test_connect_workday_hybrid.py -q
  • 63 tests passed

Live Dataverse validation approach

After /connect workday-hybrid completes, validate the resulting authorization with read-only Dataverse Web API v9.2 calls:

  1. Query delegatedauthorizations filtered by the supplied bot ID and require exactly one row with providertype = 3 (MCSBot).
  2. Query teams through delegatedauthorizationid/botid and require exactly one linked row with teamtype = 1 (Access).
  3. Query each requested workflows row by workflowid and confirm it exists and is activated.
  4. Call RetrieveSharedPrincipalsAndAccess for each workflow and confirm the linked access team has an access mask containing WriteAccess.

These checks replay the same Dataverse relationships Flow-RP uses to resolve the Cosmos-backed agent and authorize its workflows. They are GET-only and do not modify tenant state.

Live validation result

/connect workday-hybrid completed successfully and the resulting Dataverse state was independently verified for bot 2e9a99eb-98ef-4a66-8783-87ec174d8a34:

  • exactly one delegated authorization exists with provider type MCSBot
  • exactly one linked access team exists with team type Access
  • all three ESS Workday Runtime workflows exist and are activated
  • every workflow is shared with that access team using ReadAccess, WriteAccess, AppendAccess, AppendToAccess, ShareAccess

The delegated authorization and workflow access for the supplied bot were successfully validated. The tenant environment URL is intentionally omitted from this PR.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant