# How should a PCF component use Device, Utility and Web API capabilities?

Exam: AB-400 — Power Platform Developer Associate
Knowledge domain: Extend the user experience (25–30%)
Updated: 2026-11-25T06:47:18.700597+00:00
HTML: https://learningpathx.com/faq/AB-400/ab400-pcf-device-utility-webapi-host-support.html

## Also asked as

- How do I declare PCF features and handle hosts that lack them?
- How can a PCF control use camera, metadata or Dataverse reads while handling unavailable capabilities?

Check the intended app and client for each PCF method. Declare the feature in manifest `feature-usage`, mark it required only when the control cannot operate without it, and give optional capabilities a fallback.

* **Device**. For optional mobile image capture, declare `Device.captureImage` with `required="false"`. Check availability, launch capture after a user action, and handle cancellation or permission denial. Test the fallback on an unsupported client.
* **Utility**. In a supported model-driven host, use `context.utils` for features such as metadata or lookup dialogs. When `hasEntityPrivilege` depends on uncached metadata, retrieve the metadata first. Treat the result as a table-level hint and handle the actual row operation's outcome.
* **Web API**. In a supported host, declare `WebAPI` and use `context.webAPI` for a bounded read, for example retrieving only the account name. Capture the input identifier before the call and discard responses that no longer match the current request or arrive after disposal. Distinguish a failed read from a missing display value.

Test with the intended user's role and supported client. Include a denied permission, a host without the optional feature and an input change during a pending request.

[PCF feature-usage manifest example](https://learn.microsoft.com/en-us/power-apps/developer/component-framework/manifest-schema-reference/feature-usage) · [Optional and required PCF features](https://learn.microsoft.com/en-us/power-apps/developer/component-framework/manifest-schema-reference/uses-feature) · [Camera capture](https://learn.microsoft.com/en-us/power-apps/developer/component-framework/reference/device/captureimage) · [Privilege API](https://learn.microsoft.com/en-us/power-apps/developer/component-framework/reference/utility/hasentityprivilege) · [PCF retrieveRecord](https://learn.microsoft.com/en-us/power-apps/developer/component-framework/reference/webapi/retrieverecord)

Source: [AB-400: Building Reusable PCF Code Components](https://learningpathx.com/news/ab-400-building-reusable-pcf-code-components.html)
