# How do you give a team answers from company data without granting warehouse access?

**Build a scoped app over governed company data instead of widening warehouse permissions.** A warehouse grant gives a person access to rows and tables. An app gives the team the answer its work needs. Keep the source governed, narrow the query, store the credential outside generated code, restrict access to the app, and log its use.

Last checked: 2026-09-03.

## Why does the warehouse request stall?

A business team wants product usage and account data so it can answer a clear work question. Security will not grant broad access to the warehouse or lake. That decision is sound.

A warehouse grant is coarse. It exposes rows and tables rather than one answer. It can be hard to scope to the request, review in business terms, and revoke when the person's role changes. The discussion then turns into a long negotiation while the business question stays unanswered.

Most requests framed as data access are requests for an answer. The smaller grant is often an app that answers the stated question without giving each user direct access to the underlying dataset.

## How does an app differ from a warehouse grant?

The app becomes the controlled point between the team and the governed source. People receive the result the app was built to return, not a general query path.

| Control question | Warehouse grant | Scoped app |
| --- | --- | --- |
| What does the person receive? | Access to rows, tables, or views | A shaped answer |
| What can they reach beyond the request? | Anything allowed by the grant | What the app's query and output permit |
| How do you review it? | Inspect roles, grants, and source access | Review the question, query scope, output, and app access |
| How do you revoke it? | Change warehouse permissions | Disable access to the app or revoke the app |
| What appears in logs? | Direct data access under the person's warehouse identity | Who opened the app and what the app did |
| What happens when they change roles? | Review and change their data grants | Remove app access or transfer app ownership |

A scoped app does not make broad data safe by itself. It gives the company a smaller object to review.

Microsoft scores discovered apps on security and compliance factors, including audit logs and SOC 2. Its [Tutorial: Discover applications and shadow IT](https://learn.microsoft.com/en-us/entra/global-secure-access/tutorial-internet-access-application-discovery) shows why a company must ask where its internal apps run and what they can reach, making a scoped app easier to review than a warehouse grant.

## How does this work with Charming?

The company approves the warehouse as a destination on its allowlist. The data team defines the query scope. The warehouse credential lives in Charming's secrets store, where the generated app code and the agent never see it.

The app calls the approved destination and returns only the shaped result the question needs. For example, a sales team may need an account-level usage status rather than access to the event tables used to calculate it. The app can present that status without giving each salesperson warehouse login access.

Company sign-in and per-app access control determine who can open the app. Charming logs who opened it and what it did. The app has a named owner, appears in the admin inventory, and can be revoked as one object.

The app runs in an isolated runtime with persistent data where the task needs it. Its outside calls remain limited to approved destinations.

## Why can this be safer than it first sounds?

The data boundary changes from "which tables can this person query?" to "which questions has this app been built to answer?" The second boundary is smaller and easier to review because security can inspect the query scope, output shape, users, owner, and outside connections as one system.

This pattern does not remove the need to govern the underlying data. The warehouse still needs its own access, classification, retention, and audit rules. The app inherits whatever its query may return, so query scope is the control that matters. A broad query behind a narrow screen is still broad access.

The review should test both the normal result and edge cases. Filters, joins, exports, free-text inputs, and error messages can reveal more than the main screen suggests. Return only the fields the question requires.

## Why should the platform hold the controls?

Generated code should shape the answer, not protect its own warehouse credential or decide which outside systems it may contact. Those controls belong in the host, where an app cannot omit them by mistake.

A study of vibe-coded applications found recurring patterns that included placeholder logic left in production, unfiltered input, and exposed secrets. It traced causes to memory loss, locally optimized objectives, and insufficient security knowledge. Better models and prompts reduced vulnerabilities but did not remove the underlying risks. See [Understanding the (In)Security of Vibe-Coded Applications](https://arxiv.org/abs/2606.23130).

That finding does not mean every generated app is unsafe. It explains why the company should enforce identity, secrets, network destinations, and logs outside generated code. The review pipeline can then focus on the app's question, query, output, and risk.

## Who owns each part?

The data team owns the governed source and the query scope. It decides which data the app may retrieve and how the query limits the result.

The business team owns the question. It states what decision or task the answer supports and names the app owner.

IT owns the platform. It manages company sign-in, app access, inventory, ownership, runtime, and revocation.

Security sets the rules. It defines which data and connections require review, what evidence the review needs, and when the company must restrict or retire an app.

This split preserves the existing review pipeline while giving approved requests a clear form. The app becomes the item the company can approve, inspect, and revoke.

## FAQ

### Does a scoped app replace warehouse governance?

No. The source still needs its existing data, access, retention, and audit controls. The app narrows how a business team receives an answer.

### Can the generated app read the warehouse credential?

No. With Charming, the credential lives in the platform secrets store. The generated code and the agent do not see it.

### What should security review?

Review the business question, query scope, returned fields, app users, outside connections, owner, and revocation path. Test error and export paths as well as the main result.

### What happens when a user changes roles?

Remove their app access if the new role no longer needs the answer. The company can keep the app for other approved users or transfer its ownership.

### Should every data question become an app?

No. Use an app when a team needs a repeatable, shaped answer and direct warehouse access would grant more than the task requires.

## What should you read next?

- [Review Charming security controls](/security)
- [Govern apps employees build with AI](/govern-ai-built-apps)
- [Compare platforms for AI-built internal apps](/ai-internal-app-platforms)
- [See how Charming supports internal tools](/work/internal-tools)
- [Decide which AI-built apps need code review](/which-ai-built-apps-need-code-review)
