Set-ITGlueUser
SYNOPSIS
Bulk update multiple users / Update a user
SYNTAX
BulkUpdate (Default)
Set-ITGlueUser -Data <Object> [-Raw] [-WhatIf] [-Confirm]
ById
Set-ITGlueUser [-Id] <long> -Data <Object> [-Raw] [-WhatIf] [-Confirm]
ALIASES
This cmdlet has the following aliases,
- None
DESCRIPTION
Parameter set [ BulkUpdate ] - The Set-ITGlueUser cmdlet invokes the PATCH method of the /users endpoint (Bulk update multiple users)
Updates multiple users in a single request with the ‘Allow All Organizations’ feature. This endpoint supports partial success, where some users can succeed while others fail.
Important: This endpoint only supports updating the ‘all_organizations’ attribute.
The request body must contain a JSON array, for example:
{ “data”: [ { “type”: “users”, “attributes”: { “id”: 123, “all-organizations”: true } }, { “type”: “users”, “attributes”: { “id”: 0, “all-organizations”: true } }, { “type”: “users”, “attributes”: { “id”: 456, “all-organizations”: true } }, { “type”: “users”, “attributes”: { “id”: 789, “all-organizations”: false } }, { “type”: “users”, “attributes”: { “id”: 999, “all-organizations”: false } } ] }
Sample Response:
{ “data”: [ { “id”: “31”, “type”: “users”, “attributes”: { “first-name”: “Rita”, “last-name”: “Waters”, “name”: “Rita Waters”, “role-name”: “Client”, “email”: “31_margie@hermiston.co.uk”, “invitation-sent-at”: “2025-09-27T09:08:30.369Z”, “invitation-accepted-at”: “2025-09-30T09:08:30.370Z”, “current-sign-in-at”: “2025-09-30T09:08:30.370Z”, “current-sign-in-ip”: “127.0.0.1”, “last-sign-in-at”: “2025-09-30T09:08:30.370Z”, “last-sign-in-ip”: “127.0.0.1”, “reputation”: 12345, “created-at”: “2025-09-30T09:08:30.378Z”, “updated-at”: “2025-09-30T09:08:30.519Z”, “my-glue-account-id”: null, “salesforce-id”: null, “all-organizations”: true, “avatar”: “”, “my-glue”: false, “role-id”: 5 }, “relationships”: { } } ], “meta”: { “total-count”: 5, “success-count”: 1, “failure-count”: 4, “status”: “completed_with_failures”, “failed-resources”: [ { “status”: 404, “title”: “Not found”, “details”: “Record not found”, “source”: { “pointer”: “id” }, “id”: 0 }, { “status”: 403, “title”: “Unauthorised resource access”, “details”: “Bulk operations are not permitted for MyGlue users”, “source”: { “pointer”: “id” }, “id”: 32 }, { “status”: 403, “title”: “Unauthorised resource access”, “details”: “Self-modification of organization access is forbidden”, “source”: { “pointer”: “id” }, “id”: 33 }, { “status”: 403, “title”: “Unauthorised resource access”, “details”: “Cannot modify users with higher role permissions”, “source”: { “pointer”: “id” }, “id”: 34 } ] } }
Status Values:
- ‘“completed”’: All users updated successfully
- ‘“completed_with_failures”’: Some users succeeded, others failed
- ‘“failed”’: All users failed to update
Parameter set [ ById ] - The Set-ITGlueUser cmdlet invokes the PATCH method of the /users/{id} endpoint (Update a user)
Updates the name or profile picture (avatar) of an existing user.
The request body must contain a JSON object, for example:
{ “data”: { “type”: “users”, “attributes”: { “id”: 36, “first-name”: “Larry”, “last-name”: “Watson”, “avatar”: { “content”: “R0lGODlhABAQAIAAAAAAAP///yH7BAEAAAAALAAAAAAEAABAAAIBRAA5”, “file_name”: “test_file_name_2” } } }
This is a write function. It changes data in ITGlue. Use -WhatIf to see the request without sending it
EXAMPLES
EXAMPLE 1
Set-ITGlueUser -Data @{} -WhatIf
Shows the PATCH request to the /users endpoint without sending it
EXAMPLE 2
Set-ITGlueUser -Id 12345 -Data @{} -WhatIf
Shows the PATCH request to the /users/{id} endpoint without sending it
PARAMETERS
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
DefaultValue: ''
SupportsWildcards: false
Aliases:
- cf
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Data
Defines the data of the JSON:API request body. Accepts a hashtable, an object, or a JSON string
The value is sent as the data property of the request body, such as @{ type = ‘organizations’; attributes = @{ name = ‘Example’ } }. An object with a single data property & a JSON string are sent as is
Body properties:
- type (string) - users
- attributes (object):
- all_organizations (boolean) - Whether the user has access to all organizations. Requires administrator or manager with all_organizations permissions.
- id (string) - The ID of the user to update
Type: System.Object
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: ById
Position: Named
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
- Name: BulkUpdate
Position: Named
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Id
Defines the ID of the item
Type: System.Int64
DefaultValue: 0
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: ById
Position: 0
IsRequired: true
ValueFromPipeline: true
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Raw
Returns the full API response (data, meta, links, & included) instead of only the data
Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-WhatIf
Runs the command in a mode that only reports what would happen without performing the actions.
Type: System.Management.Automation.SwitchParameter
DefaultValue: ''
SupportsWildcards: false
Aliases:
- wi
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS
System.Int64
OUTPUTS
NOTES
Endpoint : PATCH /users Endpoint : PATCH /users/{id}