Skip to content

Conversation

@radu-cristea-15
Copy link
Collaborator

No description provided.

@radu-cristea-15 radu-cristea-15 force-pushed the list-user-roles branch 2 times, most recently from 0250e0d to ef1f65d Compare November 14, 2025 14:39
-ErrorAction Stop

if ($response.nextPaginationToken) {
$resourceUri += '?paginationToken=' + $response.nextPaginationToken
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you have a REALLY large list, it could be that the loops gets to this line multiple times. Then the resourceUri variable gets longer and longer. Already on the second loop, it will be invalid with twice the paginationToken parameter. You need to use a temporary variable instead of directly updating the resourceUri in every loop.


## SYNOPSIS

Returns the assigned role id of the user or null.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There can be multiple roles:

Suggested change
Returns the assigned role id of the user or null.
Returns the assigned role ids of the user or null.


## DESCRIPTION

Lists the assigned role of a user in the TeamViewer company associated with the API access token. If no role is assigned or user id is unknown, null is returned.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above:

Suggested change
Lists the assigned role of a user in the TeamViewer company associated with the API access token. If no role is assigned or user id is unknown, null is returned.
Lists the assigned roles of a user in the TeamViewer company associated with the API access token. If no role is assigned or user id is unknown, null is returned.

PS /> Get-TeamViewerRoleByUser -UserId "u123456777"
```

Lists the assigned role of the user with the ID u123456777.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above:

Suggested change
Lists the assigned role of the user with the ID u123456777.
Lists the assigned roles of the user with the ID u123456777.


### -UserId

User to list its assigned role.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above:

Suggested change
User to list its assigned role.
User to list its assigned roles.

@radu-cristea-15 radu-cristea-15 merged commit 3982cad into main Nov 21, 2025
1 check passed
@radu-cristea-15 radu-cristea-15 deleted the list-user-roles branch November 21, 2025 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants