Skip to content

Azure AD Device Code Login

Takashi Shinohara edited this page Aug 31, 2021 · 1 revision

Device Code Login is a method of logging in through a web browser using the code provided by the application. Users with MFA enabled must log in this way.

  1. Start PowerShell (Windows PowerShell or PowerShell Core) prompt.

  2. Run the Connect-KshSite cmdlet.

Connect-KshSite -Url 'https://<tenantname>.sharepoint.com'
  1. When a warning message is displayed, start a web browser (Edge, Chrome, Firefox, etc.) and open the page.
WARNING: To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code <devicecode> to authenticate.
  1. Enter the device code that is displayed in the warning message.

  1. Enter the user name and click [Next].

  1. Enter the password and click [Singn in].

  1. If MFA enabled, approve the request with mobile device.

  1. Close the window.

Clone this wiki locally