Skip to content

Sample source to reflect the process to GoogleWorkSpace based on the data of Microsoft365 Lists [All Employee List].

Notifications You must be signed in to change notification settings

ochtum/LinkToAllEmployeeList

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

LinkToAllEmployeeList

Sample source to reflect the process to GoogleWorkSpace based on the data of Microsoft365 Lists [All Employee List].

  • Currently, it is only applied to the shared drive of GoogleDrive.
  • Assuming that the trigger is executed every 5 minutes on the gas side.

1.Setup Procedure for Development Environment

(1) Install Node.js

Node.js website

(2) Execute the following command in PowerShell to install Clasp.

npm install @google/clasp -g

(3) Execute the following command in PowerShell to install npm.

npm install -g npm@latest

(4) In the folder containing .clasp.json, execute the command to log in to Clasp.

clasp login

2.The following settings are required before execution

(1) Enable Google Drive API in GCP

(2) Create authentication credentials in GCP (API Key, OAuth 2.0 Client ID, Service Account)

(3) Create a new app from "Application" -> "Register an app" in Microsoft Entra Management Center.

(4) Create a client secret under "New Client Secret" in the "Client Secret" tab under "Certificates and Secrets" in the app you created (remember to note the value at this time. Once you close it or something, it will not be visible.).

(5) Select Microsoft Graph from the "API Permissions" of the created application and add "User.Read" and "Sites.Read.All" from the application permissions.

(6) Modify the values in the Source Code

  • .clasp.json
    YOUR_SCRIPT_ID
    YOUR_ROOT_DIRECTORY
  • index.js

The following sets out the information found in the Microsoft Entra Management Center.
YOUR_MICROSOFT-ENTRA_CLIENT_ID
YOUR_MICROSOFT-ENTRA_TENANT_ID
YOUR_MICROSOFT-ENTRA_CLIENT_SECRET

Below is a Graph Explorer to see and set up what is actually used in your Micrsoft365.
YOUR_MICROSOFT365_SHAREPOINT_SITE_ID
YOUR_MICROSOFT365_LISTS_LIST_ID

The following should be the column names used in Lists. Note that if the column name is in Japanese, the alphanumeric symbols are used.
USER_EMAIL_ADDRESS

The following is set up as confirmed by GCP.
YOUR_GOOGLE_SERVICE_ACCOUNT_PRIVATE_KEY
YOUR_GOOGLE_SERVICE_ACCOUNT_CLIENT_EMAIL
YOUR_GOOGLE_API_KEY

The following sets the shared drive ID. If you want to set more than one, copy and paste "folderList.push('SHARE_DRIVE_FOLDER_ID');" to increase the number.
SHARE_DRIVE_FOLDER_ID

3.Deployment Method

Verify the settings in .clasp.json and adjust the [rootDir] setting to match the local path where the source code is located.

Execute the following command

clasp push

4.Materials

About

Sample source to reflect the process to GoogleWorkSpace based on the data of Microsoft365 Lists [All Employee List].

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published