> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XUserPrivilegeDenyReason

> XUserPrivilegeDenyReason

# XUserPrivilegeDenyReason

Specifies the reason a user could not obtain a privilege.

## Syntax

```cpp theme={null}
enum class XUserPrivilegeDenyReason  : uint32_t  
{  
    None = 0,  
    PurchaseRequired = 1,  
    Restricted = 2,  
    Banned = 3,  
    Unknown = 0xFFFFFFFF  
}  
```

## Constants

| Constant         | Description                     |
| ---------------- | ------------------------------- |
| None             | No reason.                      |
| PurchaseRequired | The user must make a purchase.  |
| Restricted       | Restrictions on the user exist. |
| Banned           | A ban on the user exists.       |
| Unknown          | Unknown reason.                 |

## Remarks

To check if a user has a specific privilege, call the [XUserCheckPrivilege](/reference/system/xuser/functions/xusercheckprivilege) function. The function accepts a pointer to an XUserPrivilegeDenyReason enumeration as an argument. The function returns an [XUserPrivilege](/reference/system/xuser/enums/xuserprivilege) enumeration.

> <img src="https://mintcdn.com/microsoft-4404708b/-_0FrcE2bDxzGxv-/images/gdk/reference/caution.gif?s=2e4f582499c4cb4859c57646638ae366" alt="alert" width="11" height="11" data-path="images/gdk/reference/caution.gif" /> **NOTE:**  The value returned in the *reason* argument is informational **only**, and may be inaccurate in many scenarios. This value **should not** be used to make decisions in your title.

## Requirements

**Header:** XUser.h

**Supported platforms:** Windows, XBOX One family consoles and XBOX Series consoles

## See also

[XUser](/reference/system/xuser/xuser_members)

[XUserCheckPrivilege](/reference/system/xuser/functions/xusercheckprivilege)

[XUserPrivilege](/reference/system/xuser/enums/xuserprivilege)


## Related topics

- [Client-side use of XBOX services user privileges](/services/xbox-services/fundamentals/identity/privileges/concepts/live-user-privileges-client.md)
- [XUserCheckPrivilege](/reference/system/xuser/functions/xusercheckprivilege.md)
- [XUser](/reference/system/xuser/xuser_members.md)
- [XblPermissionDenyReason](/reference/live/xsapi-c/privacy_c/enums/xblpermissiondenyreason.md)
- [XblPermissionDenyReasonDetails](/reference/live/xsapi-c/privacy_c/structs/xblpermissiondenyreasondetails.md)
