give me a sample workflow for a user to request a W365 developers workstation for a designated Azure Software Development Environment, including a form with appropriate fields to fill in, approval stage gate
Okay, this is a detailed request for a workflow and a form. The user wants a sample workflow for requesting a Windows 365 developer workstation tied to a specific Azure software development environment. They also want a form with fields and an approval stage gate.
First, I need to understand the context. Windows 365 Cloud PC is a Microsoft product. A developer workstation would likely need to be in a specific Azure Virtual Network (VNet) or environment to access development resources. The “designated Azure Software Development Environment” suggests there’s already a defined network, maybe with DevOps tools, source control, private endpoints, etc.
The workflow should cover the request process, approval, and then provisioning. The user mentioned an “approval stage gate,” so that’s a key step. I should outline the steps from user submission to provisioning.
For the form, what fields are necessary? Typical fields: requester info (name, email, cost center), justification/project, required specs (vCPU, RAM, storage), but for W365, there are specific license SKUs like 2vCPU/4GB, 4vCPU/16GB, etc. Better to offer a dropdown for Cloud PC size. Also critical: which Azure environment? Dev, test, sandbox? They said “designated,” so maybe a selection from pre-approved VNets or environment names. Duration needed (temporary or permanent)? Approver might need to know cost impact.
The approval stage gate: who approves? Likely a development lead, finance, or IT admin. Should define criteria for approval: budget available, business justification, compliance with environment policies. The workflow could include an email notification to approver, with an approve/reject button and comment field.
I’ll structure the answer: first describe the high-level workflow steps (request, review, approval, provisioning, notification). Then present a sample form in a table or list format. Then explain the approval gate process including possible outcomes. Finally, mention automation options like Power Automate or ServiceNow to make it practical.
Need to ensure clarity about W365 specifics: it’s a Cloud PC, not an Azure VM, but it can be joined to Azure AD and connected to the Azure VNet via network connection (Microsoft hosted network or hybrid). The workflow should assume the IT team has pre-configured the network connection for the development environment.
Let me write this in a helpful, instructional tone. Provide concrete examples for fields like “Project ID” or “Cost Center.” Include a sample approval email content. Make sure the workflow is realistic for an enterprise setting.
Here is a comprehensive sample workflow for requesting a Windows 365 (W365) Developer Cloud PC within a designated Azure Software Development Environment, including the request form and the approval stage gate.
Overview: Developer Cloud PC Request & Approval Workflow
Goal: Enable a developer to self-request a W365 Cloud PC pre-configured for a specific Azure Development Environment (e.g., “Dev-Sandbox,” “Integration-Test”), while ensuring cost control, security compliance, and environment alignment.
Actors:
- Requester: Developer or Engineer
- Approver: Development Lead or Cloud Cost Owner
- Provisioning System: Automated (Power Automate, ServiceNow, or Azure Logic Apps) or IT Admin
High-Level Steps:
- User submits request form
- Approval stage gate (Lead review)
- Automated provisioning into designated Azure environment
- Notification & access granted
Part 1: Request Form for W365 Developer Workstation
Form Title: Windows 365 Developer Cloud PC Request
Target Environment: Designated Azure Software Development Environment
Field | Type | Description / Options | Validation |
Requester Name | Text | Full name | Required |
Employee ID | Text | Unique ID | Required |
Cost Center / Project Code | Text | e.g., DEV-ALPHA-001 | Required |
Business Justification | Textarea | Brief explanation of development need | Required (max 500 chars) |
Azure Development Environment | Dropdown | Pre-approved environments only | Required |
Cloud PC Configuration | Dropdown | Based on developer workload | Required |
Intended Usage Duration | Radio | • Temporary (≤30 days) | Required |
End Date (if fixed project) | Date | When Cloud PC should be deprovisioned | Conditional |
Required Software / Image | Dropdown | Pre-defined images for the environment | Required |
Network Access Needed | Checkboxes | • Internet (default) | Optional |
Additional Comments | Textarea | Special requests (e.g., “need admin rights for npm”) | Optional |
Form Footer:
Note: By submitting, you agree that this Cloud PC is for approved development work only. Monthly cost will be charged to the provided cost center. Unused Cloud PCs are subject to automatic cleanup after 30 days of inactivity.
Part 2: Approval Stage Gate
Who: Designated Approver(s) per Azure Environment (e.g., Dev Lead, Cloud FinOps)
Trigger: Upon form submission, an approval request is sent via email/MS Teams with the details below.
Approval Workflow Steps:
- Review Request – Approver checks:
- Is the cost center valid and funded?
- Does the developer have a legitimate need for a dedicated Cloud PC (vs. local machine)?
- Is the requested configuration within team budget (e.g., no 8vCPU for basic scripting)?
- Is the target environment correct (e.g., no prod-like environment for experimental code)?
- Decision Options:
- ✅ Approve → Proceed to provisioning
- ❌ Reject → Send reason back to requester (e.g., “Use Dev-Sandbox instead of Integration”)
- 🔄 Request Changes → Ask for lower spec or shorter duration
- Automatic Escalation (optional but recommended):
- If no action in 48 hours → Escalate to second-level approver (e.g., Engineering Manager)
- If no action in 72 hours → Auto-reject with notification
Sample Approval Email / Message
Subject: Action Required: W365 Cloud PC Request from [Requester Name]
Details:
- Requester: John Doe (johndoe@company.com)
- Environment: Dev-Sandbox-EastUS
- Configuration: 4 vCPU / 16GB RAM
- Duration: 30 days (temporary)
- Justification: “Testing microservices migration”
- Estimated Monthly Cost: $72.00
Actions:
[Approve] [Reject with reason] [Request Changes]
View full request in [Service Portal Link]
Part 3: Post-Approval (Provisioning & Lifecycle)
Step | Owner | Action |
1. Provision Cloud PC | Automation (e.g., Azure Logic App + Graph API) | Creates W365 Cloud PC in the designated Azure Virtual Network (connected to the dev environment) |
2. Assign User | Automation | Assigns the Cloud PC to the requester via Microsoft Entra ID |
3. Notify User | System | Email sent: “Your Dev Cloud PC is ready – access via https://windows365.microsoft.com“ |
4. Apply Policies | Intune | Enforces environment-specific policies (e.g., no copy-paste to personal devices, MFA required) |
5. Set Expiry | Automation | If temporary, schedule deprovisioning after 30 days (with 7-day warning) |
Optional Enhancements
- Cost Pre-validation: Integrate with a FinOps API to reject requests that exceed team monthly budget.
- Auto-approval for low-risk requests: Requests for 2vCPU / ≤7 days / Dev-Sandbox environment could bypass manual approval.
- Periodic recertification: Monthly email to approver asking, “Is Cloud PC XYZ still needed?” – otherwise auto-suspend.
Would you like me to expand this into a JSON schema for an automation tool (e.g., Power Automate, ServiceNow catalog item) or provide the approval logic as pseudo-code?
This response is AI-generated, for reference only.
Yes. expand this into how this can be implemented as a sharepoint request front page with instructions to fill in a linked Sharepoint form, and power automate to automate the workflow with outlook email
We need to expand the previous answer into a concrete implementation using SharePoint front page (instruction page), linked SharePoint form, Power Automate for workflow, and Outlook email approvals. Provide step-by-step guidance, including how to create the form, the flow logic, approval emails, and post-provisioning actions. The user wants a practical implementation guide.
Key components:
- SharePoint front page: instructions, link to form.
- SharePoint list or Microsoft Forms? The request says “linked Sharepoint form” – likely a SharePoint list with a custom form (PowerApps) or Microsoft Form embedded. But for Power Automate, a SharePoint list is easiest. We’ll assume a SharePoint list called “W365 Developer Workstation Requests” with columns matching the fields. Then use Power Automate to trigger on new item, send approval email via Outlook, wait for response, then provision (or log). Provisioning could be via Graph API or manual step.
We’ll provide:
- Setup of SharePoint site and list.
- Creation of the request form (using SharePoint list default form or PowerApps).
- Instructions page on SharePoint.
- Power Automate flow: trigger, approval, conditions, update item status, send email notifications.
- Integration with Outlook for approval buttons.
- Optional: post-provisioning actions (like calling an Azure Automation runbook or sending to IT team).
We’ll also mention alternatives like Microsoft Forms if preferred.
Let’s write a detailed answer.
Below is an implementation blueprint for your Windows 365 Developer Workstation request system using:
- SharePoint Online – front page with instructions + a linked request form (SharePoint list)
- Power Automate – workflow engine
- Outlook – approval emails with actionable buttons
- SharePoint Setup – Front Page & Form
1.1 Create a SharePoint Site (or use an existing team site)
- Example: https://yourtenant.sharepoint.com/sites/DevCloudPCRequests
1.2 Create a SharePoint List – “W365 Requests”
This list acts as the data source and the request form.
Column Name | Type | Options / Notes |
Title | Single line of text | Will store requester name (or short description) |
RequesterEmail | Single line of text | Email address |
EmployeeID | Single line of text | |
CostCenter | Single line of text | |
Justification | Multiple lines of text | |
AzureEnvironment | Choice | Dev-Sandbox-EastUS, Integration-Test-Central, Pre-Prod-EU |
CloudPCSize | Choice | 2vCPU/8GB, 4vCPU/16GB, 8vCPU/32GB |
DurationType | Choice | Temporary (≤30d), Ongoing, Fixed project |
EndDate | Date and Time | Required if DurationType = Fixed project |
SoftwareImage | Choice | VS Code + .NET 8, VS2022 + Node.js, Docker + Python 3.11 |
NetworkAccess | Multiple lines of text (or multi-choice) | Internet, SQL Private Endpoint, VPN |
Comments | Multiple lines of text | |
Status | Choice | Pending Approval, Approved, Rejected, Provisioned, Deprovisioned (default: Pending Approval) |
ApproverComment | Multiple lines of text | (populated by Power Automate) |
Tip: Use the “Create a Microsoft form that stores responses in this list” option if you prefer a modern form experience. But for Power Automate, a SharePoint list works directly.
1.3 Customise the List Form (Optional but recommended)
- Open the list → Integrate → Power Apps → Customise forms
- Improve layout, add validation, show/hide EndDate based on DurationType.
1.4 Create the SharePoint Front Page (Instructions)
- On the SharePoint site, create a new Site Page named “Request a W365 Developer Workstation”
- Add text instructions:
Step 1: Ensure you have cost centre approval from your lead.
Step 2: Click the button below to open the request form.
Step 3: Fill in all required fields. After submission, your lead will receive an email to approve/deny.
Step 4: Once approved, you will receive the Cloud PC access link within 2 hours.
- Insert a button/link pointing to your SharePoint list form:
https://yourtenant.sharepoint.com/sites/DevCloudPCRequests/Lists/W365Requests/NewForm.aspx
- Power Automate – Workflow Logic
2.1 Trigger
- Flow name: W365 Request – Approval Workflow
- Trigger: When an item is created (SharePoint)
- Site Address: your site
- List Name: W365 Requests
2.2 Initialise variables (optional but useful)
- ApproverEmail – string (can be static or dynamic from a SharePoint list of environment owners)
- ApprovalOutcome – string
- CloudPCId – string (for future provisioning)
How to determine approver:
Use a SharePoint lookup list “EnvironmentApprovers” with columns: AzureEnvironment, ApproverEmail. Then in the flow, get the approver based on the selected AzureEnvironment.
Simpler for demo: Hardcode or use a fixed approver (e.g., dev-lead@company.com).
2.3 Send approval email (Outlook / Approvals connector)
- Action: Start and wait for an approval (Approvals connector)
- Approval type: Approve/Reject – First to respond
- Title: W365 Cloud PC request from [Requester Name]
- Assigned to: [dynamic ApproverEmail]
- Details:
text
Requester: {RequesterEmail}
Environment: {AzureEnvironment}
Config: {CloudPCSize}
Duration: {DurationType} {EndDate}
Justification: {Justification}
Monthly est. cost: $XX (you can compute with a simple expression)
- Item link: Link to the SharePoint list item
- Enable ‘Outlook actionable messages’ – this adds Approve/Reject buttons directly in the email.
2.4 Condition – Check approval outcome
- Case: Approve
- Update SharePoint item: Status = Approved
- Send email to requester (Outlook): “Your request has been approved. Provisioning will start shortly.”
- Provisioning action (see options below)
- Option A (fully automated): Call Microsoft Graph API via HTTP action to create a Cloud PC (requires delegated permissions and a managed identity). Complex but doable.
- Option B (semi-automated): Create a task in a shared “IT Provisioning” list or send an email to IT team with all details.
- Option C (trigger Azure Automation): Call a runbook that uses Graph API.
- Case: Reject
- Update SharePoint item: Status = Rejected, ApproverComment = Approval comments
- Send rejection email to requester with approver’s comment.
2.5 Post-provisioning notification (after external provisioning)
If you use semi-automated, add a manual step where IT admin clicks a button in SharePoint to trigger the final “Provisioned” email.
Or use a delayed action (e.g., wait 1 hour, then send a reminder to IT).
Tip: For full automation, use the HTTP with Azure AD connector to call Graph API POST /deviceManagement/virtualEndpoint/cloudPCs. You’ll need to pre-create a provisioning policy and assign it.
- Outlook Email Approval Experience
When the approver receives the email (Outlook desktop or web), they see:
W365 Cloud PC request from John Doe
[Approve] [Reject]
Clicking a button immediately sends the response back to Power Automate – no need to open a portal.
The email body contains all request details. If they click Reject, they are prompted to enter a reason (that reason becomes the ApproverComment in SharePoint).
- End-to-End User Journey
Step | Action | Owner | System |
1 | Opens SharePoint front page, reads instructions | Developer | SharePoint |
2 | Clicks “Request form” link, fills & submits | Developer | SharePoint list form |
3 | Power Automate trigger fires, sends approval email | Power Automate | Outlook |
4 | Lead receives email, clicks Approve/Reject | Approver | Outlook |
5 | Flow updates SharePoint status, emails user | Power Automate | SharePoint + Outlook |
6 | (Automated or manual) Cloud PC is provisioned | IT or Graph API | W365 / Azure |
7 | User gets final email with access link | Power Automate | Outlook |
- Complete Power Automate Flow (Pseudo-Structure)
text
Trigger: When an item is created (SharePoint)
├─ Get item details (dynamic content)
├─ Get approver email from EnvironmentApprovers list (or static)
├─ Start and wait for approval (Assigned to: ApproverEmail)
│ ├─ Outcome = Approve → Condition
│ │ ├─ Update SharePoint item: Status = “Approved”
│ │ ├─ Send email to Requester: “Approved – provisioning started”
│ │ ├─ (Optional) Call Graph API to create Cloud PC
│ │ │ ├─ If success → Update Status = “Provisioned”, send access link
│ │ │ └─ If fail → Send alert to IT admin
│ │ └─ (Manual fallback) Create task in “IT To-Do” list
│ └─ Outcome = Reject
│ ├─ Update SharePoint item: Status = “Rejected”, ApproverComment
│ └─ Send email to Requester: “Rejected – reason: {ApproverComment}”
└─ (If no response after 48h) → Escalate to second approver or auto-reject
- Advanced Enhancements
Feature | Implementation |
Dynamic cost estimation | Add a calculated column in SharePoint or use a compose action in Power Automate to compute cost based on CloudPCSize and duration. |
Auto-expiry | Another flow that runs daily, checks EndDate or last activity, and triggers deprovisioning via Graph API. |
Approval escalation | In Power Automate, add a “Delay until” action + “Send approval to second user” if no response in 48h. |
Audit log | Every status change is automatically tracked in SharePoint version history or a separate audit list. |
- Alternative: Microsoft Forms + Power Automate
If you prefer not to use a SharePoint list as the form:
- Create a Microsoft Form with identical fields.
- Use Power Automate trigger When a response is submitted (Forms).
- Create item in a SharePoint list (or Dataverse) for tracking.
- Then proceed with approval flow as above.
The SharePoint list is still useful for central tracking and history.
Next Steps for You
- Create the SharePoint list with the columns shown.
- Build the Power Automate flow using the approval connector.
- Test – submit a request as a developer, approve via Outlook, verify SharePoint status updates.
- Decide on provisioning automation – start with semi-automated (email IT team), then move to Graph API later.
Would you like me to provide the exact JSON definition of the SharePoint list (for quick creation via PnP PowerShell) or a Power Automate export package?
This response is AI-generated, for reference only.
power automate export package please
We need to provide a Power Automate export package. However, Power Automate flows are exported as .zip files containing a JSON definition (workflow) and connections. I cannot directly generate a binary .zip file, but I can provide the flow definition JSON that you can import manually into Power Automate. The user can save it as a .json file and then import it via “My flows” -> “Import” -> “Select file”. I’ll include clear instructions.
I’ll also note that connection references need to be reconfigured after import (SharePoint, Outlook, Approvals). I’ll produce a detailed JSON for the flow described: trigger on SharePoint item creation, get approver (static or from list), send approval, handle approve/reject, update item, send emails.
I’ll simplify: use a static approver email (placeholder) and include instructions to change it. Also include a commented section for dynamic approver from a list.
Let me write the JSON.
I cannot directly send a .zip file, but I can provide the flow definition JSON that you can import into Power Automate manually. Below is the complete exported flow for the W365 Developer Workstation request approval workflow.
How to Import This Flow
- Copy the JSON from the code block below into a text file (e.g., W365_Approval_Flow.json).
- In Power Automate → My flows → Import → Select file → choose your .json file.
- After import, Power Automate will ask you to reconfigure connections (SharePoint, Outlook, Approvals). Set them up using your credentials.
- Update the static approver email (or implement the dynamic approver logic as described in the comments inside the JSON).
- Turn on the flow.
Flow Definition JSON
json
{
“$schema”: “https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#”,
“contentVersion”: “1.0.0.0”,
“parameters”: {
“$connections”: {
“defaultValue”: {},
“type”: “Object”
}
},
“triggers”: {
“When_an_item_is_created”: {
“type”: “ApiConnection”,
“inputs”: {
“host”: {
“connectionName”: “shared_sharepointonline”,
“operationId”: “WhenItemCreated”
},
“parameters”: {
“siteAddress”: “YOUR_SITE_URL”,
“listName”: “W365 Requests”
},
“authentication”: {
“type”: “Raw”,
“scheme”: “Key”,
“parameter”: “$connections[‘shared_sharepointonline’][‘connectionId’]”
}
},
“recurrence”: {
“frequency”: “Second”,
“interval”: 60
},
“splitOn”: “@triggerBody()?[‘value’]”
}
},
“actions”: {
“Get_item_details”: {
“type”: “ApiConnection”,
“inputs”: {
“host”: {
“connectionName”: “shared_sharepointonline”,
“operationId”: “GetItem”
},
“parameters”: {
“siteAddress”: “YOUR_SITE_URL”,
“listName”: “W365 Requests”,
“id”: “@triggerBody()?[‘ID’]”
},
“authentication”: {
“type”: “Raw”,
“scheme”: “Key”,
“parameter”: “$connections[‘shared_sharepointonline’][‘connectionId’]”
}
},
“runAfter”: {}
},
“Initialize_approver_email”: {
“type”: “InitializeVariable”,
“inputs”: {
“variables”: [
{
“name”: “ApproverEmail”,
“type”: “string”,
“value”: “dev-lead@yourcompany.com”
}
]
},
“runAfter”: {
“Get_item_details”: [
“Succeeded”
]
}
},
“Send_approval_email”: {
“type”: “ApiConnection”,
“inputs”: {
“host”: {
“connectionName”: “shared_approvals”,
“operationId”: “SendApproval”
},
“parameters”: {
“approvalType”: “ApproveRejectFirstToRespond”,
“title”: “W365 Cloud PC request from @{triggerBody()?[‘Title’]}”,
“assignedTo”: “@variables(‘ApproverEmail’)”,
“details”: “Requester: @{triggerBody()?[‘RequesterEmail’]}\nEnvironment: @{triggerBody()?[‘AzureEnvironment’]}\nConfiguration: @{triggerBody()?[‘CloudPCSize’]}\nDuration: @{triggerBody()?[‘DurationType’]} @{triggerBody()?[‘EndDate’]}\nJustification: @{triggerBody()?[‘Justification’]}\n\nEstimated monthly cost: $72.00 (update this logic as needed)”,
“itemLink”: “https://yourtenant.sharepoint.com/sites/DevCloudPCRequests/Lists/W365Requests/DispForm.aspx?ID=@{triggerBody()?[‘ID’]}”,
“notificationType”: “Email”,
“enableActionableMessages”: true
},
“authentication”: {
“type”: “Raw”,
“scheme”: “Key”,
“parameter”: “$connections[‘shared_approvals’][‘connectionId’]”
}
},
“runAfter”: {
“Initialize_approver_email”: [
“Succeeded”
]
}
},
“Condition_approval_outcome”: {
“type”: “If”,
“expression”: {
“equals”: [
“@body(‘Send_approval_email’)?[‘result’]?[‘outcome’]”,
“Approve”
]
},
“actions”: {
“Update_SharePoint_status_approved”: {
“type”: “ApiConnection”,
“inputs”: {
“host”: {
“connectionName”: “shared_sharepointonline”,
“operationId”: “UpdateItem”
},
“parameters”: {
“siteAddress”: “YOUR_SITE_URL”,
“listName”: “W365 Requests”,
“id”: “@triggerBody()?[‘ID’]”,
“item”: {
“Status”: “Approved”
}
},
“authentication”: {
“type”: “Raw”,
“scheme”: “Key”,
“parameter”: “$connections[‘shared_sharepointonline’][‘connectionId’]”
}
},
“runAfter”: {}
},
“Send_approval_email_to_requester”: {
“type”: “ApiConnection”,
“inputs”: {
“host”: {
“connectionName”: “shared_outlook”,
“operationId”: “SendEmail”
},
“parameters”: {
“emailMessage”: {
“To”: “@triggerBody()?[‘RequesterEmail’]”,
“Subject”: “Your W365 Cloud PC request has been approved”,
“Body”: “Dear @{triggerBody()?[‘Title’]},\n\nYour request for a @{triggerBody()?[‘CloudPCSize’]} Cloud PC in the @{triggerBody()?[‘AzureEnvironment’]} environment has been **approved**.\n\nProvisioning will begin shortly. You will receive another email when it is ready.\n\nRequest ID: @{triggerBody()?[‘ID’]}\n\nThank you.”
}
},
“authentication”: {
“type”: “Raw”,
“scheme”: “Key”,
“parameter”: “$connections[‘shared_outlook’][‘connectionId’]”
}
},
“runAfter”: {
“Update_SharePoint_status_approved”: [
“Succeeded”
]
}
},
“Call_Graph_API_to_provision_Cloud_PC”: {
“type”: “ApiConnection”,
“inputs”: {
“host”: {
“connectionName”: “shared_msmanaged_graph”,
“operationId”: “PostGraph”
},
“parameters”: {
“body”: {
“displayName”: “W365-@{triggerBody()?[‘Title’]}”,
“description”: “@{triggerBody()?[‘Justification’]}”,
“provisioningPolicyId”: “YOUR_PROVISIONING_POLICY_ID”,
“userPrincipalName”: “@{triggerBody()?[‘RequesterEmail’]}”
},
“path”: “/deviceManagement/virtualEndpoint/cloudPCs”
},
“authentication”: {
“type”: “Raw”,
“scheme”: “Key”,
“parameter”: “$connections[‘shared_msmanaged_graph’][‘connectionId’]”
}
},
“runAfter”: {
“Send_approval_email_to_requester”: [
“Succeeded”
]
}
},
“Send_final_access_email”: {
“type”: “ApiConnection”,
“inputs”: {
“host”: {
“connectionName”: “shared_outlook”,
“operationId”: “SendEmail”
},
“parameters”: {
“emailMessage”: {
“To”: “@triggerBody()?[‘RequesterEmail’]”,
“Subject”: “Your W365 Cloud PC is ready”,
“Body”: “Your Cloud PC has been provisioned. Access it at: https://windows365.microsoft.com\n\nIf you cannot log in after 30 minutes, please contact IT support.”
}
},
“authentication”: {
“type”: “Raw”,
“scheme”: “Key”,
“parameter”: “$connections[‘shared_outlook’][‘connectionId’]”
}
},
“runAfter”: {
“Call_Graph_API_to_provision_Cloud_PC”: [
“Succeeded”
]
}
}
},
“else”: {
“actions”: {
“Update_SharePoint_status_rejected”: {
“type”: “ApiConnection”,
“inputs”: {
“host”: {
“connectionName”: “shared_sharepointonline”,
“operationId”: “UpdateItem”
},
“parameters”: {
“siteAddress”: “YOUR_SITE_URL”,
“listName”: “W365 Requests”,
“id”: “@triggerBody()?[‘ID’]”,
“item”: {
“Status”: “Rejected”,
“ApproverComment”: “@{body(‘Send_approval_email’)?[‘result’]?[‘comments’]}”
}
},
“authentication”: {
“type”: “Raw”,
“scheme”: “Key”,
“parameter”: “$connections[‘shared_sharepointonline’][‘connectionId’]”
}
},
“runAfter”: {}
},
“Send_rejection_email_to_requester”: {
“type”: “ApiConnection”,
“inputs”: {
“host”: {
“connectionName”: “shared_outlook”,
“operationId”: “SendEmail”
},
“parameters”: {
“emailMessage”: {
“To”: “@triggerBody()?[‘RequesterEmail’]”,
“Subject”: “Your W365 Cloud PC request was not approved”,
“Body”: “Dear @{triggerBody()?[‘Title’]},\n\nYour request for a Cloud PC has been **rejected** by the approver.\n\nReason given: @{body(‘Send_approval_email’)?[‘result’]?[‘comments’]}\n\nIf you believe this is an error, please contact your development lead.”
}
},
“authentication”: {
“type”: “Raw”,
“scheme”: “Key”,
“parameter”: “$connections[‘shared_outlook’][‘connectionId’]”
}
},
“runAfter”: {
“Update_SharePoint_status_rejected”: [
“Succeeded”
]
}
}
}
},
“runAfter”: {
“Send_approval_email”: [
“Succeeded”
]
}
}
},
“outputs”: {}
}
Important Post-Import Configuration
After importing, you must update the following placeholders:
Placeholder | Where to change | Example |
YOUR_SITE_URL | Trigger + Get item details + Update actions | https://contoso.sharepoint.com/sites/DevCloudPCRequests |
YOUR_PROVISIONING_POLICY_ID | Call_Graph_API_to_provision_Cloud_PC action | 00000000-0000-0000-0000-000000000000 (from Microsoft Graph) |
dev-lead@yourcompany.com | Initialize_approver_email variable | actual approver email or use dynamic lookup |
https://yourtenant.sharepoint.com/…/DispForm.aspx?ID=… | Send_approval_email → itemLink | Use actual SharePoint list item display URL |
Optional: Dynamic Approver (instead of static)
Replace the Initialize_approver_email action with a Get items action that retrieves the approver from a SharePoint list named EnvironmentApprovers (columns: AzureEnvironment, ApproverEmail). Then use a Filter array to match the selected environment and output the email.
If you want me to generate that dynamic version as a separate JSON, let me know.
Notes on Graph API Provisioning
The flow includes a step Call_Graph_API_to_provision_Cloud_PC. This requires:
- A custom connector or the Microsoft Graph premium connector with delegated permissions: CloudPC.ReadWrite.All.
- A pre-created provisioning policy ID.
- The user (requester) must be licensed for Windows 365.
If you prefer semi-automated (email to IT), replace that action with a Send email to an IT shared mailbox containing all request details.
Testing Checklist
- SharePoint list W365 Requests exists with all columns.
- Flow connections reconfigured (check lightning bolt icon in flow editor).
- Approver email address is correct.
- User submitting request has a valid email (for notifications).
- Run a test: create a new list item → flow triggers → approver gets Outlook actionable email → click Approve → check SharePoint status → email sent to requester.
Let me know if you need a version with escalation logic or auto-expiry – I can provide additional JSON snippets to insert.
lastly, how can automate the capture of status of approval process back into a log in Sharepoint showing a historical list of when past approval dates, by whom, and new entries for what has been submitted and updated when it is approved
We need to address the user’s request: “automate the capture of status of approval process back into a log in Sharepoint showing a historical list of when past approval dates, by whom, and new entries for what has been submitted and updated when it is approved.”
The user wants a historical log in SharePoint that tracks approval events: date, approver name, status changes, and links to original request. This is essentially an audit trail.
We need to provide a solution using Power Automate and SharePoint. Options:
- Use a separate SharePoint list as an audit log.
- Use version history on the main list (but that doesn’t capture “by whom” easily for approvals).
- Use a flow that writes to a log list each time an approval action occurs.
Best practice: Create a second SharePoint list “W365 Approval Log” with columns: RequestID (lookup or text), Timestamp, Action (Submitted, Approved, Rejected, Provisioned), Actor (Requester or Approver), Comments, Status before/after.
Then modify the Power Automate flow to append to this log at each step: when item created, when approved, when rejected, when provisioned.
Provide instructions and JSON snippet for the log list and modifications to the flow.
Also ensure the user can see “historical list of when past approval dates, by whom” – so the log list serves as that view.
Thus, answer should include:
- Create a SharePoint list “W365 Approval Log” with columns.
- Update the Power Automate flow to add actions: “Create item in approval log” after each status change.
- Optionally provide a Power Apps gallery view or SharePoint view to display the log filtered by request.
Provide concise, actionable steps and a JSON snippet for the log list creation (or table schema).
To capture a historical approval audit trail in SharePoint, you’ll add a separate log list that records every status change: submission, approval, rejection, and provisioning. This gives you a complete view of past approval dates, who acted, and what changed.
Below is the implementation plan, including the new SharePoint list and modifications to your Power Automate flow.
- Create a SharePoint Log List: “W365 Approval Log”
Column Name | Type | Description |
Title | Single line of text | Auto‑populated with Request ID – Action (e.g., REQ-5 – Approved) |
RequestID | Lookup (or Number) | Link to the original request item’s ID (or use a text field with ID) |
RequestTitle | Single line of text | Requester name / Title from the main request (for readability) |
Action | Choice | Submitted, Approved, Rejected, Provisioned, Deprovisioned |
Actor | Single line of text | Who performed the action (Requester email or Approver email) |
Timestamp | Date and Time | Default = current time when item is created |
Comments | Multiple lines of text | Approver’s reason, justification, or system notes |
StatusBefore | Single line of text | Previous status of the request (e.g., “Pending Approval”) |
StatusAfter | Single line of text | New status after the action (e.g., “Approved”) |
Optional but recommended: Create a view called “Historical Log – Group by Request” that groups by RequestTitle and sorts by Timestamp descending.
- Modify Your Power Automate Flow to Write to the Log
Insert “Create item” actions (targeting the W365 Approval Log list) at these key points in your existing flow:
- a) When request is submitted (first trigger)
- When: Right after the trigger When an item is created
- Action: Create item in Approval Log
- RequestID = triggerBody()?[‘ID’]
- RequestTitle = triggerBody()?[‘Title’]
- Action = Submitted
- Actor = triggerBody()?[‘RequesterEmail’]
- Timestamp = utcNow()
- Comments = triggerBody()?[‘Justification’]
- StatusBefore = (empty)
- StatusAfter = Pending Approval
- b) When request is approved
- Inside the approval condition (Approve branch) after updating the main item’s status to Approved (or before)
- Action: Create item in Approval Log
- RequestID = triggerBody()?[‘ID’]
- RequestTitle = triggerBody()?[‘Title’]
- Action = Approved
- Actor = body(‘Send_approval_email’)?[‘responder’]?[’email’] (or dynamic approver email)
- Timestamp = utcNow()
- Comments = body(‘Send_approval_email’)?[‘result’]?[‘comments’]
- StatusBefore = Pending Approval
- StatusAfter = Approved
- c) When request is rejected
- Inside the rejection branch after updating main item to Rejected
- Action: Create item in Approval Log (similar to above, but Action = Rejected, StatusAfter = Rejected)
- d) (Optional) When Cloud PC is provisioned
- After the Graph API call or the IT email send
- Action: Create item in Approval Log (Action = Provisioned, StatusAfter = Provisioned)
- JSON Snippet for the Log Actions (Ready to Paste into Flow)
Replace YOUR_SITE_URL and YOUR_LOG_LIST_NAME with your actual values.
Example: Log entry for “Approved” action
json
“Create_approval_log_approved”: {
“type”: “ApiConnection”,
“inputs”: {
“host”: {
“connectionName”: “shared_sharepointonline”,
“operationId”: “CreateItem”
},
“parameters”: {
“siteAddress”: “YOUR_SITE_URL”,
“listName”: “W365 Approval Log”,
“item”: {
“Title”: “Request @{triggerBody()?[‘ID’]} – Approved”,
“RequestID”: “@{triggerBody()?[‘ID’]}”,
“RequestTitle”: “@{triggerBody()?[‘Title’]}”,
“Action”: “Approved”,
“Actor”: “@{body(‘Send_approval_email’)?[‘responder’]?[’email’]}”,
“Timestamp”: “@{utcNow()}”,
“Comments”: “@{body(‘Send_approval_email’)?[‘result’]?[‘comments’]}”,
“StatusBefore”: “Pending Approval”,
“StatusAfter”: “Approved”
}
},
“authentication”: {
“type”: “Raw”,
“scheme”: “Key”,
“parameter”: “$connections[‘shared_sharepointonline’][‘connectionId’]”
}
},
“runAfter”: {}
}
Note: You will need to insert this action in the appropriate place in your flow. For the “Submitted” entry, you cannot use body(‘Send_approval_email’) because that action hasn’t run yet. Use triggerBody() for the actor (requester email).
- Viewing the Historical Log
Once the log is populated, users with access to the SharePoint site can:
- Open W365 Approval Log list → see every action in chronological order.
- Create a Power BI report connected to the list to visualise approval times by approver.
- Use a Power Apps gallery on the request form to show the history for the current request inline.
Example SharePoint view configuration (no code):
- Filter: Action is not empty
- Sort: Timestamp descending
- Group by: RequestTitle
This gives you exactly: “a historical list of when past approval dates, by whom, and new entries for what has been submitted and updated when it is approved.”
- Complete Flow Structure (Updated)
text
Trigger: When item is created (main request list)
│
├─ Create log entry: “Submitted”
│
├─ Send approval email to approver
│
├─ Condition: Is approved?
│ ├─ Yes → Update main item status = “Approved”
│ │ Create log entry: “Approved” (with approver email & comments)
│ │ Send approval email to requester
│ │ (Optionally) Provision Cloud PC → then log “Provisioned”
│ │
│ └─ No → Update main item status = “Rejected”
│ Create log entry: “Rejected” (with approver comments)
│ Send rejection email to requester
Next Steps
- Create the log list using the schema above.
- Edit your existing Power Automate flow – add the “Create item” actions at the points shown.
- Test – submit a new request, approve it, then open the log list. You should see at least two entries: “Submitted” and “Approved”.
- (Optional) Add a lookup column in the main request list that shows the latest log entry (via a calculated column or a separate flow).
If you need me to provide the complete updated JSON of your flow with all four log actions already inserted, just let me know – I can merge it with the earlier flow definition.
Xxx#30445_1_text_20260410_8198d1#30445_2_text_20260410_d9895d#30445_5_text_20260410_51b0af