---
title: GetHintValue
framework: security
role: symbol
role_heading: Instance Property
path: security/authorizationcallbacks/gethintvalue
---

# GetHintValue

Reads a value stored by the plug-in authorization mechanism.

## Declaration

```occ
int (*)(struct __OpaqueAuthorizationEngine *, const char *, const struct AuthorizationValue **) GetHintValue;
```

## Parameters

- `inEngine`: An opaque handle that is passed to your plug-in when the authorization engine calls your doc://com.apple.security/documentation/Security/AuthorizationPluginInterface/MechanismCreate function.
- `inKey`: A key indicating which value you want to retrieve. This key must correspond to one you specified when you used the doc://com.apple.security/documentation/Security/AuthorizationCallbacks/SetHintValue function to store a hint value.
- `outValue`: On input, allocate a pointer to an doc://com.apple.security/documentation/Security/AuthorizationValue structure. On output, the structure contains the size of the data and a pointer to the data. Because your doc://com.apple.security/documentation/Security/AuthorizationValue structure does not own the data, you must not deallocate the structure or the data pointed to by the structure.

## Mentioned in

Extending authorization services with plug-ins

## Return Value

Return Value A result code. Possible results are errAuthorizationSuccess (no error) and errAuthorizationInternal (Security Server internal error).

## Discussion

Discussion Your plug-in authorization mechanism can save and retrieve auxiliary information—called hints—for use by subsequent mechanisms that are part of the same authorization. You use the SetHintValue function to have the Security Server store this data and the GetHintValue function to retrieve it. Hints are not preserved as part of the authorization result; once all mechanisms have approved the authorization or any mechanism has denied it, the security engine disposes of the hints. The authorization engine sends you the entry point to the GetHintValue function in an AuthorizationCallbacks structure when you call the AuthorizationPluginCreate function. important: Do not call this function after you have called the SetResult function. If you do so, the data retrieved by the GetHintValue function might not reflect the current value even though the function returns the errAuthorizationSuccess result code.
