← Back to articles Azure

Microsoft Graph Beta: customDataProvidedResourceUploadSession – referenceId & files

Microsoft Graph Beta: customDataProvidedResourceUploadSession – referenceId & files

Microsoft Entra ID lets you run Access Reviews — periodic checks to validate who should still have access to a resource. Normally a reviewer clicks Approve or Deny manually. But there's a powerful twist: you can feed external data (HR systems, ITSM tools, third-party Identity Governance) into the review engine so decisions happen automatically. The plumbing that makes this work is customDataProvidedResourceUploadSession.

This article explains the full pipeline — what the API does, what changed in April 2026, how the session lifecycle works, and how everything fits together — with diagrams for every step.

⚠ Beta endpoint

All calls go to /beta. Breaking changes can happen without notice and there are no SLA guarantees. Always build fallback logic before shipping to production.

Big Picture — How the Pipeline Works

Before diving into API details, here's the full architecture from data source to final review decision:

DATA SOURCES 🏢 HR System SAP / Workday / etc. 🎫 ITSM Tool ServiceNow / Jira 🔐 IGA Platform SailPoint / Saviynt AUTOMATION Your Pipeline Script / Azure Function Logic App / Power Automate POST + upload GRAPH BETA API Upload Session customDataProvided ResourceUploadSession PATCH isUploadDone=true ENTRA ID Access Review Engine processes your custom data → Auto decisions ✅ Approve / ❌ Deny Automated outcome NEW: referenceId Links session → Review instance
Full architecture — external data flows through your automation pipeline into the Graph Beta Upload Session, which Entra ID consumes to drive automatic review decisions.

What Is an Access Review? (Quick primer)

An Access Review in Entra ID is a scheduled process that asks: "Should this person still have this access?" Without custom data, a human reviewer clicks Approve or Deny for each user. With customDataProvidedResourceUploadSession, your system answers that question automatically by uploading a file that contains pre-computed decisions or signals.

WITHOUT CUSTOM DATA (manual) Review starts Human reviews Click ✅ or ❌ Done ⏱ Slow · expensive · error-prone WITH CUSTOM DATA (automated) Your pipeline runs Upload session + file Entra decides automatically ⚡ Done
Manual vs. automated review flow — custom data eliminates the human bottleneck.

Upload Session Lifecycle

Every upload session goes through a strict state machine. Understanding it prevents the most common failure — data that silently never gets processed.

POST Create Session created STATUS active Upload files here POST /upload (repeat) PATCH isUploadDone=true STATUS complete Entra processing Review Engine Reads your data → auto decisions ⚠ If session times out → status: expired → unusable, create new 💀 Forget PATCH? Stays active forever · data never processed
Session state machine — the most common mistake is forgetting the final PATCH, leaving the session stuck in active with data silently unprocessed.
💀 Most Common Failure

If you never send PATCH isUploadDone: true, the session stays active forever. The data never gets processed. There is no visible error. Always add the PATCH as your final step.

Step-by-Step: How to Use the API

  1. Create the upload session
    POST to your custom data provider's uploadSessions endpoint. Get back a session id.
    POST /beta/identityGovernance/accessReviews
         /customDataProviders/{providerId}/uploadSessions
    
    {
      "source": "MyHRSystem",       // must match provider name
      "referenceId": "{reviewInstanceId}"  // NEW April 2026
    }
  2. Upload your data file(s)
    POST the file payload to the session. Repeat for multiple files. Each call appends data.
    POST /beta/.../uploadSessions/{sessionId}/upload
    
    // Body: your CSV / JSON with user decisions or signals
    // e.g. userId + recommended action (approve/deny)
  3. Signal that upload is complete
    PATCH the session — this is the trigger that moves the session to complete and starts Entra processing.
    PATCH /beta/.../uploadSessions/{sessionId}
    
    {
      "isUploadDone": true   // ← CRITICAL. Never skip this.
    }
  4. (Optional) Inspect uploaded files
    Use the new files relationship to debug what was actually received.
    GET /beta/.../uploadSessions/{sessionId}?$expand=files
    
    // Filter & sort within expand:
    ?$expand=files($filter=status eq 'processed';$orderby=createdDateTime desc)

What Changed in April 2026 NEW

referenceId BEFORE (pain 😤) Session created → no link to which review it belongs to. Manual mapping required. Multi-review automations were fragile and error-prone. AFTER (clean ✅) Set referenceId = reviewInstanceId at creation. Filter directly: $filter=referenceId eq '{instanceId}' files relationship BEFORE (blind 😵) Upload a file → no way to verify what arrived. Debugging was impossible without support tickets. AFTER (visible ✅) Expand files on any session: ?$expand=files Supports $filter, $orderby, $expand. Debug in real-time.
April 2026 additions: referenceId solves multi-review correlation; files relationship finally makes upload debugging possible.

Resource Properties Reference

Property Type Filter Sort Notes
idStringRead-only GUID assigned at creation
createdDateTimeDateTimeOffsetUseful for fetching latest session
statusEnumactive · complete · expired
isUploadDoneBooleanMUST be PATCHed true to trigger processing
sourceStringMust exactly match your provider name
referenceId NEWStringAccess Review instance ID — enables direct filtering
typeStringFixed value, set by the system
dataObjectContext payload for the session
statsObjectPost-upload diagnostics (row counts, errors)
files NEWCollectionRelationship — use $expand=files to inspect uploads

Permissions & Licensing

API SCOPES AccessReview.ReadWrite.All ✓ Required IdentityGovernance .ReadWrite.All ✓ Required *.Read.All ✗ Not enough → 403 ENTRA ROLES Global Administrator Identity Governance Admin Custom scoped role Any one of these is sufficient LICENSING Entra ID P2 Minimum required Governance SKU Recommended for full features Per-user license required for reviewed users
Permissions, roles, and licensing requirements — you need at least one item from each column.
💡 Principle of least privilege

Use a custom scoped role with only the permissions your automation pipeline actually needs. Avoid Global Administrator for service accounts.

Why Build This?

Here are the real-world scenarios this unlocks:

🏢 HR-Driven Access Validation Employee changes role? HR pushes new job data. Access auto-denied for old permissions. 🤖 External Decision Engines ML model scores risk. High-risk users auto- denied. Low-risk auto- approved. 🎫 ITSM-Driven Validation ServiceNow ticket required to keep access. No ticket? Auto-denied. Zero Manual Review Workflows All decisions pre- computed. Reviewers only see exceptions. Scales to thousands.
Real-world use cases — from HR-triggered automation to zero-touch review workflows at scale.

Building in Production — Beta Caveats

⚠ Beta API — protect your pipeline

Because the endpoint lives at /beta, design defensively. Version-pin your calls, catch 4xx/5xx explicitly, and have a fallback to manual review if the upload session fails. Monitor session status after each run so you catch expired states before they cause silent failures in a review cycle.

Quick Reference

Thing to rememberWhy it matters
referenceId NEWSet at creation → filter sessions by review instance ID. Essential for multi-review automation.
$expand=files NEWInspect and debug exactly what was uploaded. Supports $filter and $orderby.
PATCH isUploadDone: trueWithout this, session stays active, data is never processed, no error thrown. Always do this last.
/beta endpointNo SLA. Breaking changes possible. Build fallback logic before shipping to prod.
*.ReadWrite.All scopeRead.All returns 403. Your service principal needs write permissions.

Was this article helpful?

🎁 Free Community Assets

Functional Resources

Jump-start your automation with these production-ready assets associated with this guide.

Project Blueprint

IntuneFileVault

A self-service SaaS portal that lets IT admins securely upload, track, and audit custom data provider files to Intune devices via Microsoft Graph — without writing a single line of code.

View Technical Blueprint

🎓 Ready to go deeper?

Practice real MD-102 exam questions, get AI feedback on your weak areas, and fast-track your Intune certification.

Start Free Practice → Book a Session
Souhaiel Morhag
Souhaiel Morhag
Microsoft Endpoint & Modern Workplace Engineer

Souhaiel Morhag is a Microsoft Intune and endpoint management specialist with hands-on experience deploying and securing enterprise environments across Microsoft 365. He founded MSEndpoint.com to share practical, real-world guides for IT admins navigating Microsoft technologies — and built the MSEndpoint Academy at app.msendpoint.com/academy, a dedicated learning platform for professionals preparing for the MD-102 (Microsoft 365 Endpoint Administrator) certification. Through in-depth articles and AI-powered practice exams, Souhaiel helps IT teams move faster and certify with confidence.

Related Articles

Popular on MSEndpoint