Skip to content
tempkey ← Back to blog

Tempkey Blog

How to Manage Contractor Access to Microsoft Azure Blob Storage

Learn how to give contractors scoped, time-limited access to Azure Blob Storage containers, verify what they can reach, and prove the access was removed when the engagement ends.

To safely grant an external partner access to files without giving away the keys to your cloud infrastructure, you must restrict privileges directly at the object layer. Learning how to manage contractor access to Microsoft Azure Blob Storage requires pairing granular Azure RBAC assignments or time-limited Shared Access Signatures (SAS) with automated offboarding procedures. By applying fine-grained azure storage access control and strict expiry dates, you protect sensitive assets, maintain robust contractor file access security, and ensure external accounts do not linger indefinitely.

Start With the Access Model, Not the Credentials

Before issuing any credentials, understand the three distinct administrative layers an outside contractor can interact with: the Azure subscription, the storage account, and individual containers or blobs. Granting permissions at the subscription or storage account level grants wide administrative visibility across your infrastructure. For external collaborators, you want to scope access down to a single container or specific prefixes inside that container.

You also need to distinguish between control-plane and data-plane operations:

  • Control-plane access: Allows users to create, delete, configure, or list storage accounts. Contractors analyzing data, uploading creative assets, or auditing files do not need control-plane permissions.
  • Data-plane access: Governs reading, writing, modifying, and deleting actual blobs and files stored inside the containers. This is almost often the only scope external contractors require.

The standard operating rule for any cloud platform is the principle of least privilege, emphasized within frameworks like the NIST SP 800-207 Zero Trust Architecture: grant access at the narrowest boundary that permits the contractor to finish their job. Prefer scoping to a single container over account-level access whenever possible. Similar principles apply across other cloud providers, as detailed in our guide on contractor access management for AWS S3.

The most common failure mode for small teams and busy operators is convenience. Handing over a storage account access key because it takes 30 seconds bypasses all data-plane scoping. Storage account keys confer full administrative control over the entire storage account, allow access to all containers within it, and lack individual user attribution in logs. When five external people share an account key, you cannot tell who uploaded, downloaded, or deleted a specific blob.

Azure Role-Based Access Control (Azure RBAC) and Shared Access Signatures (SAS) represent two fundamentally different technical mechanisms for delegating access. RBAC relies on directory identities, whereas SAS tokens rely on signed URL parameters. Choosing the appropriate mechanism dictates how easy or difficult revoking that access will be down the line.

Pick the Right Grant Type for a Contractor

Selecting the right authorization pattern depends on the contractor's workflows, whether they already possess an identity in your directory, and how long the collaboration lasts.

1. User Delegation SAS

A User Delegation SAS is secured using Microsoft Entra ID credentials rather than the underlying storage account key. It allows you to delegate limited permissions to a specific container or blob while enforcing an expiration period. Because it is backed by an Entra identity, any permissions associated with the SAS are governed by the identity's role assignments. This makes it an effective default choice for external collaborators when you need time-bound URL access linked directly to directory controls.

2. Service SAS

A Service SAS is signed directly with a storage account key and grants access to a specific resource (such as a single container or blob). It is useful when working with an external agency that does not have an identity provisioned inside your Microsoft Entra tenant. However, because it is signed using the storage account key, the underlying signing secret is sensitive. If an uncontrolled service SAS is leaked, revoking it without an underlying stored policy requires rotating the storage account key itself.

3. Account SAS

An Account SAS is signed with the account key and can delegate access to all resources and services (Blob, Queue, Table, File) across the entire storage account. Because it exposes the entire account, you should avoid issuing an Account SAS to contractors and freelancers unless there is a strictly documented operational requirement.

4. Stored Access Policies

When you generate a Service SAS for a container, you can optionally link it to a stored access policy defined on that container. A stored access policy acts as a server-side control group: it specifies the permissions and expiration interval. If a contractor leaves earlier than planned, deleting or modifying the stored access policy immediately invalidates every SAS token tied to it without breaking other applications or requiring account key rotation. This is a practical compromise for multi-week engagements where contractors lack directory logins.

5. Azure RBAC Data-Plane Roles

When contractors need direct access to the Azure Portal, Azure Storage Explorer, or the Azure CLI, assign them specific Azure RBAC data-plane roles rather than handing out SAS tokens. Microsoft defines built-in roles such as Storage Blob Data Reader (read-only access) and Storage Blob Data Contributor (read, write, and delete access). You assign these roles directly to an invited guest identity using Microsoft Entra B2B collaboration. Scoping these roles at the container level ensures guest users view and manipulate only designated workspaces, a pattern we also highlight in our overview of contractor access management in Microsoft Azure.

Grant Type Setup Effort Scope Granularity Revocation Complexity Audit Trail Attribution
User Delegation SAS Medium Container or Blob Fast (revoke Entra identity or key) High (tied to Entra principal)
Service SAS with Stored Access Policy Medium Container or Blob Fast (delete the stored policy) Moderate (tied to SAS identifier)
Ad-hoc Service SAS Low Container or Blob Complex (requires key rotation) Low (token-based only)
Account SAS Low Entire Storage Account Complex (requires key rotation) Low (token-based only)
Azure RBAC Data-Plane Roles Medium Account, Container, or Blob Fast (remove role assignment) High (tied to Entra guest identity)

Set Expiry and Scope Before You Share Anything

Every credential shared with an external party must be bounded by scope, duration, and protocol before transmission.

First, align the SAS expiration timestamp with the specific project milestone or contract end date rather than an arbitrary default like 90 days. Shorter authorization windows reduce exposure in the event of an unnoticed token leak. If an engagement runs for two weeks, set the token to expire in 14 days. If the contractor needs an extension, treat that extension as an explicit operational review step rather than creating open-ended access.

Second, evaluate network restrictions. Azure SAS creation allows you to restrict traffic to specific IP ranges. If a contractor works from a static office IP or routes traffic through a corporate VPN, limit the SAS token to that specific CIDR block. However, take note of the limitation for remote contractors working over dynamic residential connections or mobile hotspots: IP-locking a token in those scenarios often leads to repeated authorization errors as their ISP rotates IP addresses.

Third, enforce transport protocol controls. Require HTTPS traffic when generating SAS URLs; avoid unencrypted HTTP requests over public networks. Restrict the requested permissions strictly to the task at hand. If an agency only needs to upload assets, grant Create and Write permissions without Delete or List. Limiting privileges prevents accidental file overwrites or unauthorized enumeration of container contents.

For Azure RBAC guest assignments, implement just-in-time activations if your organization holds licenses for Microsoft Entra ID P2 or Microsoft Entra ID Governance. Using Privileged Identity Management (PIM), external contractors can be granted an eligible assignment rather than a standing role. This ensures they must explicitly activate access for limited intervals, reducing background risk.

Always document the grant parameters immediately within your internal contractor tracking records: identity, target container, permission level, issue date, expiration date, and the internal approver. If you distribute a SAS token over messaging platforms like Slack or email, treat it as a bearer credential: anyone who intercepts or discovers that URL can read or modify data within the specified scope until it expires. Similar tracking hygiene is recommended when managing outside developers, as covered in our guide on contractor access in Azure DevOps.

Revoke Contractor Access to Azure Blob Storage When the Work Ends

When an engagement concludes, conduct offboarding methodically to ensure access is fully terminated across all operational layers.

Step 1: Delete or modify the stored access policy. If the contractor accessed data through a Service SAS bound to a stored access policy, remove that policy from the target container. Modifying the policy name or deleting it entirely invalidates every active SAS token generated from it, terminating active sessions immediately.

Step 2: Remove Entra guest RBAC assignments. If access was granted through directory roles, locate the contractor's guest identity within Azure RBAC and remove assignments at both the container and storage account scopes. Documentation on Azure role-based access control (Azure RBAC) highlights that access relies directly on live role assignments; stripping the assignment cuts off their permission to invoke data-plane APIs.

Step 3: Rotate storage account keys if unmanaged tokens were shared. If an ad-hoc Service SAS or Account SAS was issued directly using a storage account key without a stored policy, your only option to terminate that token before its natural expiration date is rotating the parent access key. As outlined in the guide on managing storage account access keys, rotating an account key invalidates every application, script, and SAS token that relies on that specific key. Coordinate this action carefully, as rotating primary keys can take dependent services offline if they share the credential.

Step 4: Check for indirect access paths. Review external access across your broader pipeline. Contractors often retain access to storage through secondary mechanisms: deployment scripts stored in source control, automated CI/CD runners, or connection strings deposited in an Azure Key Vault secret that the contractor can read. Close indirect paths alongside the primary storage resource.

Step 5: Confirm state through the Azure control plane. Because distributed cloud control planes can experience brief replication intervals, query the API or inspect the portal after issuing revocation calls. Avoid assuming an operation succeeded without inspecting the resulting state.

Verify the Revocation Instead of Trusting It

Closing a ticket or clicking a "Delete" button does not guarantee access is gone. Verification ensures that configuration changes have propagated correctly across cloud regions.

Begin by checking role assignments. Query the Azure Portal or run the Azure CLI to list all active role assignments at the container and storage account level. Verify that the contractor's Entra guest identity no longer appears on any access control list (ACL) or role assignment table for that storage account.

Next, list the stored access policies on the container. Confirm that the policy identifier associated with the contractor's SAS token is deleted. Once deleted, attempt a simple cURL or HTTP GET request against the signed URL to verify that Azure Storage returns a 403 AuthenticationFailed or 403 AccessDenied status code.

Finally, clean up communication records. Check project task tickets, setup guides, and internal chat messages to locate shared URLs or access parameters. While invalidating a policy renders a URL non-functional, leaving active URLs in tickets creates audit ambiguities during future internal reviews.

When you build an access management framework, read-back verification provides confirmation. Tempkey grants contractor access for a set period, revokes it automatically when the grant expires, reads provider state back to confirm the removal on natively enforced providers, and records each step in an exportable audit trail. For Azure Blob Storage specifically, treat verification as a manual operational step unless the contractor's underlying access was provisioned through a directory provider Tempkey enforces.

Export the terminal CLI output, portal confirmation, or access log summary, and archive it directly inside the contractor offboarding record.

Build an Audit Trail You Can Show a Client or Auditor

When enterprise clients, security assessors, or partner teams conduct vendor reviews, they often demand proof of how third-party access is managed. Maintaining a defensible posture requires recording four events for every contractor engagement:

  1. Grant: The exact timestamp when access was provisioned, including the specific container, permissions granted, and the operational sponsor who authorized the grant.
  2. Extension: Any modifications to the original deadline, documenting the justification, authorizer, and updated expiration timestamp.
  3. Revocation: The precise moment access was rescinded, detailing the mechanism (such as policy deletion, role removal, or account deactivation).
  4. Verification: Documented proof confirming that access was tested and verified as non-functional post-revocation.

Azure Activity Logs and Azure Storage Diagnostic Logs capture storage-level telemetry, such as which IP addresses read or modified specific blobs. However, Azure logs do not capture human context—they show that an operation occurred, but not who approved the contractor's request, why the timeline changed, or whether the engagement concluded on schedule.

Your team needs a centralized, human-readable record covering internal approvals. Tempkey keeps an append-only audit trail you can export to CSV or PDF, giving your operations and IT leads a concrete record when stakeholders ask who accessed sensitive data during a project. Tempkey gives you an exportable, append-only audit trail to support your own compliance and offboarding records. Tempkey does not hold SOC 2, ISO 27001, HIPAA, or PCI certification.

Define retention schedules based on business agreements and commercial contracts. Most commercial clients mandate keeping third-party access records for between 12 and 36 months following project completion to support mutual data protection reviews.

Where Azure Blob Access Fits in Your Wider Contractor Offboarding

Contractors working on Azure storage workloads rarely interact solely with blob containers. An outside developer, agency team, or data specialist typically requires access across a broader ecosystem: project repositories, communication channels, cloud boards, and identity providers.

Before launching an engagement, map the contractor's footprint across all relevant platforms: Azure resources, collaboration spaces, identity groups, and project tracking tools. Removing an Azure RBAC role does not automatically disconnect an external collaborator from your team chat or shared file repositories.

Tempkey natively enforces access on 10 providers — Slack, Google Workspace, Microsoft 365, GitHub, GitLab, Zoom, AWS IAM, Figma, Dropbox, and Asana. Notion and Trello are limited-native (tracked, not fully enforced) and Zapier/Make are best-effort webhook bridges without automated verification. Automatic Slack deactivation uses Slack's SCIM API, which Slack offers on its Business+ and Enterprise plans. On other Slack plans, Tempkey verifies that access was removed rather than removing it.

Plans are month-to-month across Free, Team, and Business tiers with active-grant limits of 2, 10, and 30. Business includes extended audit-history retention. Clear separation of responsibilities keeps systems manageable: Azure Blob Storage access itself is managed directly inside your Azure environment, while Tempkey tracks the grant timelines and automates offboarding across your core SaaS and identity tools.

A Repeatable Checklist for the Next Contractor Engagement

Use this operational checklist to manage contractor access across your team's storage infrastructure:

Phase 1: Pre-Engagement Preparation

  • Identify the exact container and folder paths required; ensure no account-level access is assigned.
  • Determine data permissions: strictly Read, or Read/Write (avoid granting Delete unless necessary).
  • Agree upon an explicit expiration date aligned with project milestones.
  • Designate an internal operational lead to review and approve access.

Phase 2: Day-One Provisioning

  • Invite the contractor as an Entra ID B2B guest or generate a container-scoped Service SAS tied to a stored access policy.
  • Enforce HTTPS-only protocol communication.
  • If the contractor operates behind a known corporate gateway, apply IP address range restrictions.
  • Log the provisioning event in your central access register, recording the scope and authorized timeline.

Phase 3: Mid-Project Maintenance

  • Treat all extension requests as deliberate reviews; avoid rolling forward access dates indefinitely.
  • Avoid sending account keys or unmanaged bearer tokens via unencrypted communication channels.
  • Check monthly that current access matches active contractual requirements. For step-by-step guidance, consult our contractor access management checklist.

Phase 4: Offboarding and Revocation

  • Delete the stored access policy or remove the Entra ID guest RBAC assignment from the container.
  • Verify that dependent tools, CI pipelines, and Key Vault secrets do not leave connection strings accessible.
  • Test that the revoked URL or guest login fails with an authentication error.
  • Export the verification status and store it alongside your project sign-off records.

Phase 5: Periodic Auditing

  • Conduct a quarterly audit of storage account role assignments and guest identities across your tenant.
  • Remove orphaned guest users who no longer have active assignments.
  • Audit existing stored access policies to delete legacy configurations.

Frequently Asked Questions

What is the safest way to give a contractor access to a single Azure Blob Storage container?

The safest approach is to create an Entra B2B guest identity for the contractor and assign an Azure RBAC data-plane role (such as Storage Blob Data Reader) scoped directly to that specific container. If the contractor lacks an Entra-compatible identity, use a Service SAS scoped to the container and bound to a stored access policy. Avoid providing storage account keys.

Do Azure SAS tokens expire automatically, and what happens if I forget to revoke one?

Azure SAS tokens stop working once their defined expiration timestamp passes. However, if you set an excessively long duration (such as a year) and forget to revoke it when a project ends early, the token remains an active bearer credential. Anyone in possession of that signed URL can continue reading or writing to your storage container until the timestamp lapses or the parent signing key is rotated.

Should I use Azure RBAC or a SAS token for contractor access?

Use Azure RBAC if the contractor needs to interact with files using the Azure Portal, Azure CLI, or Storage Explorer, as RBAC ties access directly to their guest identity and provides complete user attribution. Use a User Delegation SAS or a Service SAS (bound to a stored access policy) if the contractor only needs to programmatically upload or download files via a direct script or web URL without authenticating through your Azure tenant.

How do I check whether a contractor still has access to my storage account?

Inspect the Access Control (IAM) tab of the storage account and individual containers in the Azure Portal, or execute az role assignment list in the Azure CLI to verify their guest identity is not assigned. For token-based access, inspect the stored access policies on each container to confirm no active policies remain linked to tokens distributed to that contractor.

Can I automate contractor offboarding for Azure Blob Storage and other tools?

Yes. While Azure data-plane permissions are configured in Azure via RBAC or stored access policies, broader contractor lifecycles can be managed centrally. By connecting your foundational toolset to a workflow system, you can assign defined expiration windows that prompt automated revocations across identity and collaboration tools, avoiding forgotten accounts and fragmented offboarding steps.


If Azure Blob Storage is one of a dozen tools your contractors touch, stop tracking grants in a spreadsheet. Start a free Tempkey workspace, connect your providers, and see how a time-limited grant with an exportable audit trail looks for your next engagement.