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

# 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](https://docs.xbox.com/reference/system/xuser/functions/xusercheckprivilege.md) function. The function accepts a pointer to an XUserPrivilegeDenyReason enumeration as an argument. The function returns an [XUserPrivilege](https://docs.xbox.com/reference/system/xuser/enums/xuserprivilege.md) enumeration.

> ![alert](https://mintcdn.com/microsoft-4404708b/-_0FrcE2bDxzGxv-/images/gdk/reference/caution.gif?s=2e4f582499c4cb4859c57646638ae366) **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](https://docs.xbox.com/reference/system/xuser/xuser_members.md)

[XUserCheckPrivilege](https://docs.xbox.com/reference/system/xuser/functions/xusercheckprivilege.md)

[XUserPrivilege](https://docs.xbox.com/reference/system/xuser/enums/xuserprivilege.md)


## Related topics

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