Skip to content

Commit

Permalink
Merge pull request #110 from silinternational/develop
Browse files Browse the repository at this point in the history
Release 6.8.5 -- fix the RestAPI adapter ID handling
  • Loading branch information
briskt authored Sep 9, 2024
2 parents c6d9467 + 15c7f22 commit 4a728ef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -747,6 +747,7 @@ In the [Google Developer Console](https://console.developers.google.com) ...
* For the Google Users adapter, enable "Admin SDK"
* For the Google Groups adapter, enable "Admin SDK"
* For the Google Contacts adapter, enable "Contacts API"
* For the Google Sheets adapter, enable "Google Sheets API"
* Create a new Service Account and a corresponding JSON credential file, which should contain something like this:

```json
Expand Down Expand Up @@ -774,7 +775,7 @@ In Google Admin, Security, [API Controls](https://admin.google.com/ac/owl?hl=en)
`https://www.googleapis.com/auth/admin.directory.group.member`
* The API Scope required for Google Contacts is: `https://www.google.com/m8/feeds/contacts/`
* The API Scope required for Google User Directory is: `https://www.googleapis.com/auth/admin.directory.user`
* Google Sheets does not require Domain-wide Delegation. Instead, share the sheet with the service account. Note: it will say the user is not in the organization. This warning can be ignored.
* Google Sheets does not require Domain-wide Delegation. Instead, share the sheet with the service account. Note: it will say the user is not in the organization. This warning can be ignored. If you do add a `DelegatedAdminEmail` address, you must use the API Scope https://www.googleapis.com/auth/spreadsheets which will grant admin access to all sheets.

The sync job will need to use the Service Account credentials to impersonate another user that has
appropriate domain privileges and who has logged in at least once into Google Workspace and
Expand Down
3 changes: 3 additions & 0 deletions internal/internal.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ func GenerateChangeSet(logger *log.Logger, sourcePeople, destinationPeople []Per

if !personAttributesAreEqual(logger, sp, destinationPerson, config) {
sp.ID = destinationPerson.Attributes["id"]
if destinationPerson.ID != "" { // use ID if it is set to something else
sp.ID = destinationPerson.ID
}
changeSet.Update = append(changeSet.Update, sp)
continue
}
Expand Down

0 comments on commit 4a728ef

Please sign in to comment.