AttributedNetworkUsage Class  
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents per-attribution usage statistics (bytes sent, bytes received, connected duration) returned by ConnectionProfile.GetAttributedNetworkUsageAsync.
public ref class AttributedNetworkUsage sealed/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class AttributedNetworkUsage final[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class AttributedNetworkUsagePublic NotInheritable Class AttributedNetworkUsage- Inheritance
- Attributes
Windows requirements
| Device family | 
							Windows 10 (introduced in 10.0.10240.0) | 
| API contract | 
							Windows.Foundation.UniversalApiContract (introduced in v1.0) | 
Remarks
Retrieval
Instances are produced by calling ConnectionProfile.GetAttributedNetworkUsageAsync on a ConnectionProfile for a specified time window.
Attribution identity
- AttributionIdcan represent an app, a system/service bucket, or an aggregated classification.
- Absence of an expected id in a window means no recorded usage (not necessarily uninstalled).
Data characteristics
- Values are aggregated for the requested window; not real-time counters (provider accounting latency applies).
- Some buckets may report only sent or only received bytes; zeros are valid.
- A trailing partial interval (window ends mid-granularity) is provisional; values may grow on later queries.
Residual / unattributed usage
The difference between aggregate usage (from GetNetworkUsageAsync) and the sum of attributed entries can represent system, privacy-suppressed, or otherwise unattributed traffic. Treat this as a logical "unattributed" bucket if full reconciliation is required.
Identifier stability
Do not treat AttributionId as a permanent device-unique key. Rebase mappings after OS upgrade, device reset, or policy
changes.
Refresh & lifetime
Re-query when fresh numbers are needed; avoid holding instances long term. Use incremental collection patterns (closed bucket cursor) similar to aggregate usage.
Reconciliation & late adjustments
Periodically re-query the most recent closed bucket(s) to pick up late accounting changes. Apply positive deltas only to your stored cumulative totals rather than overwriting historical values.
Note
Summed attributed usage may be less than (or equal to) aggregate usage; do not inflate attributed buckets to force equality.
Recommended pattern
- Query aggregate and attributed usage for the same aligned window.
- Compute per-id deltas for fully closed buckets.
- Track residual bytes (aggregate − sum(attributed)) separately.
- Persist new cursor boundary and cumulative totals.
Properties
| AttributionId | Gets the Id of the app. | 
| AttributionName | Gets the name of the app. | 
| AttributionThumbnail | Gets the thumbnail of the app. | 
| BytesReceived | Gets the number of bytes received by the app over the network. | 
| BytesSent | Gets the number of bytes sent by the app over the network. |