The Simplest Way to Make Azure Functions and Looker Work Like They Should
Teams pair azure functions and looker to run serverless jobs on fresh business data. Looker triggers a cloud job from a dashboard, or a function pulls report rows. This workflow turns static charts into active tools for your whole team. A user clicks an action in a report and starts a backend task. Or a timer job runs a query and sends an alert to chat. Both directions need clear rules for keys, roles, and logs. How azure functions and looker share data and keys Data flows between these two
Your coding agents run with your access.
Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.
Teams pair azure functions and looker to run serverless jobs on fresh business data. Looker triggers a cloud job from a dashboard, or a function pulls report rows.
This workflow turns static charts into active tools for your whole team. A user clicks an action in a report and starts a backend task. Or a timer job runs a query and sends an alert to chat. Both directions need clear rules for keys, roles, and logs.
How azure functions and looker share data and keys
Data flows between these two tools in two main ways. First, Looker can send a webhook payload to an HTTP function endpoint. The report sends row data or filter values to the cloud app. The function checks the request header and runs custom code on that payload.
Second, an Azure function can call the Looker API to fetch query results. The function logs in with a client key and gets a short token. Then it asks Looker to run a saved report or check a model. Looker queries the database and sends clean rows back to the function.
Both paths rely on cloud identities and secret stores to stay safe. The function stores its API secret in an Azure vault using a managed identity. When the function wakes up, it reads the secret and logs in. Looker maps that API key to a specific user role with limited rights.
Common risks with shared keys and broad roles
Many teams set up this link with one admin key for all functions. That single key can read every model and change system settings in Looker. If a developer leaks that key in a log, an attacker gets everything. Shared service accounts also ruin your audit logs.
When five apps use one Looker account, every query looks the same. You cannot tell which function ran a slow query or pulled private rows. Database admins only see one generic service user hitting the warehouse all day.
Azure RBAC + Cloud Functions IAM: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Inbound webhooks from Looker to Azure carry similar risks if left open. A public function URL with a static code can be called by anyone. If that key never changes, old contractors or outside scripts can trigger jobs. Without strict payload checks, a bad request can write junk to your apps.
Scoping roles and network paths between both tools
Fix these risks by creating one Looker service user for each Azure function. Give each user a small role that only sees the needed data models. Never give admin rights to a bot that only reads one sales table. Rotate the API secrets on a fixed schedule using your cloud secret store.
Lock down the network path so only known hosts can talk to each other. Set up IP rules on your Azure function to allow only Looker servers. Require a signed secret header on every action request coming from a report. Your function code should check that signature before it processes any data rows.
Keep clear logs on both sides of the workflow for every single run. Have the function send a custom run ID when it calls the API. Store the caller identity, the report ID, and the timestamp in central logs. If a report holds emails or card numbers, mask those fields in results.
Add runtime guardrails and masking beside your databases and APIs
Login rules, role grants, and CI checks govern who connects to your stack. Yet any allowed script, engineer, or AI agent still runs commands with the full scope of its role. For workloads on Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes, SSH, or internal HTTP services, hoop.dev sits beside the service as an open-source proxy, a sidecar for your database or API.
Before a query runs, hoop.dev guardrails check the statement against your rules. An AI Analyzer you configure can score intent or hold risky calls for human review. Next, hoop.dev data masking rewrites sensitive fields in responses, and each verdict is logged per listener. Explore the MIT-licensed project on GitHub.
Frequently asked questions
How does Looker trigger an Azure Function from a dashboard?
You set up an action destination in Looker that points to your function URL. When a user clicks the action, Looker sends the data as JSON. The function checks the secret header and runs your custom workflow.
Where should an Azure Function store Looker API keys?
Store the API client ID and secret in Azure Key Vault. Give the function a managed identity so it can read the vault secret. Never hardcode API keys in your function code or app settings.
How do we limit what data an Azure Function can read in Looker?
Create a dedicated Looker user account just for that single function. Assign a custom role that grants read rights to one model set only. Add row filters to that user if the function only needs regional data.
Related guides
In this post