Skip to content

Getting Started

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

Admin Consent

In order to use this module, you must first go through the process of admin consent for Azure AD application. Global Administrator is the only role that can give admin consent. For more information about Azure AD application consent experiences, see reference.

  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 who has Global Administrator role and click [Next].

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

  1. Check [Consent on behalf of your organization] and click [Accept].

  1. Close the window.

User Mode

Normally, using this module requires Admin Consent, but you can use User Mode that does not require Admin Consent. However, you can use this mode to manage only items and lists.

For the first run, you need to log in using Device Code Login. From the next time, you will also be able to use Password Login.

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

  2. Run the Connect-KshSite cmdlet.

Connect-KshSite -Url 'https://<tenantname>.sharepoint.com' -UserMode
  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. Check [Consent on behalf of your organization] and click [Accept].

  1. Close the window.

Clone this wiki locally