Click to Rate and Give Feedback
MSDN
MSDN Library
Security
Authorization
 IsTokenRestricted Function
IsTokenRestricted Function

The IsTokenRestricted function indicates whether a token contains a list of restricted security identifiers (SIDs).

Syntax

C++
BOOL WINAPI IsTokenRestricted(
  __in  HANDLE TokenHandle
);

Parameters

TokenHandle [in]

A handle to an access token to test.

Return Value

If the token contains a list of restricting SIDs, the return value is nonzero.

If the token does not contain a list of restricting SIDs, the return value is zero.

If an error occurs, the return value is zero. To get extended error information, call GetLastError.

Remarks

The CreateRestrictedToken function can restrict a token by disabling SIDs, deleting privileges, and specifying a list of restricting SIDs. The IsTokenRestricted function checks only for the list of restricting SIDs. If a token does not have any restricting SIDs, IsTokenRestricted returns FALSE, even though the token was created by a call to CreateRestrictedToken.

Requirements

Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinbase.h (include Windows.h)
LibraryAdvapi32.lib
DLLAdvapi32.dll

See Also

Access Control Overview
Basic Access Control Functions
CreateRestrictedToken

Send comments about this topic to Microsoft

Build date: 9/11/2009

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Site Feedback
Page view tracker