Muokkaa

Jaa


Revoke-SPOUserSession

Provides IT administrators the ability to invalidate a particular users' O365 sessions across all their devices.

Syntax

Revoke-SPOUserSession
      [-User] <String>
      [-Confirm]
      [-WhatIf]
      [<CommonParameters>]

Description

You must be a Global Administrator to run the cmdlet.

Requires a valid Connect-SPOService context to identify the tenant. For information about how to connect to the tenant, see Connect-SPOService.

When the cmdlet is run the following will occur:

User will be signed out of browser, desktop and mobile applications accessing Office 365 resources across all devices.

Will not be applicable for guest users.

Possible results for this cmdlet are:

Result Reason
Warning : We couldn't find the user@contoso.com. Check for typos and try again. Invalid input for -User parameter.
We successfully signed out from all devices. Successful instantaneous revocation.
It can take up to an hour to sign out from all devices. Successful non-instantaneous revocation.
Sorry, something went wrong and we couldn't sign out from any device. The cmdlet did not successfully execute.
The cmdlet will be available in the future, but it isn't ready for use in your organization yet. The cmdlet has been disabled for the tenant.

Examples

EXAMPLE 1

Revoke-SPOUserSession -User user1@contoso.com

This example signs out user1 in the Contoso tenancy from all devices.

EXAMPLE 2

Revoke-SPOUserSession -User user1@contoso.com -Confirm:$false

This example signs out user1 in the Contoso tenancy from all devices without prompting for confirmation.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online

-User

Specifies a user name. For example, user1@contoso.com

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False
Applies to:SharePoint Online

Inputs

None

Outputs

System.Object