IBitsTokenOptions::ClearHelperToken method

Discards the helper token, and does not change the usage flags.

Syntax


HRESULT ClearHelperToken();

Parameters

This method has no parameters.

Return value

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

Older implementations effectively required that BITS users have administrator privileges in order to clear a helper token with this method. Starting with Windows 10, version 1607, non-administrator BITS users can use this method to clear helper tokens on BITS jobs they own. This change enables non-administrator BITS users (such as background downloader services running under the NetworkService account) to use helper tokens effectively.

Specifically, the implementation has been changed to allow users without administrator privileges to clear a helper token, as long as the SID of the caller's thread's token is the same as the SID of the job owner's user account during the IBackgroundCopyJob::QueryInterface call.

Requirements

Minimum supported client

Windows 7

Minimum supported server

Windows Server 2008 R2

Redistributable

Windows Management Framework on Windows Vista with SP1, Windows Vista with SP2, and Windows Server 2008 with SP2

Header

Bits4_0.h

IDL

Bits4_0.idl

IID

IID_IBitsTokenOptions is defined as 9a2584c3-f7d2-457a-9a5e-22b67bffc7d2

See also

IBitsTokenOptions

 

 

Show: