< Back

Get-CrmUserPrivileges

Sat Jan 18, 2020 4:02 pm

NAME Get-CrmUserPrivileges



SYNOPSIS

Retrieves privileges a CRM User has.





SYNTAX

Get-CrmUserPrivileges [-conn <CrmServiceClient>] [-UserId] <String> [<CommonParameters>]





DESCRIPTION

The Get-CrmUserPrivileges cmdlet lets you retrieve privileges a CRM User has. Result set contains following

properties.



Depth: Accumulated privilege Depth

PrivilegeId: Privilege ID

PrivilegeName: Privilege Name

Origin: Indicate where the privilege comes from. RoleName:Depth format

PrincipalType: User or Team

PrincipalName: User's fullname or Team's name

BusinessUnitName: User's or Team's BusinessUnitName





PARAMETERS

-conn <CrmServiceClient>

A connection to your CRM organization. Use $conn = Get-CrmConnection <Parameters> to generate it.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-UserId <String>

An Id (guid) of CRM User.



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS









OUTPUTS









NOTES









-------------------------- Example 1 --------------------------



Get-CrmUserPrivileges -conn $conn -UserId f9d40920-7a43-4f51-9749-0549c4caf67d



This example retrieves privileges assigned to the CRM User.







Depth : Global

PrivilegeId : 59f49e9a-a621-4836-8a35-b44f1f7122fb

PrivilegeName : prvAppendToConvertRule

Origin : Marketing Manager:Global,System Administrator:Global

PrincipalType : User

PrincipalName : kenichiro nakamura

BusinessUnitName : Contoso



Depth : Global

PrivilegeId : 368aff3b-95b1-45c1-bf73-01a7becdedc5

PrivilegeName : prvAppendToCustomerOpportunityRole

Origin : Salesperson:Global

PrincipalType : Team

PrincipalName : TeamA

BusinessUnitName : Contoso

...



-------------------------- Example 2 --------------------------



Get-CrmUserPrivileges f9d40920-7a43-4f51-9749-0549c4caf67d



This example retrieves privileges assigned to the CRM User by omitting parameter names.

When omitting parameter names, you do not provide $conn, cmdlets automatically finds it.







Depth : Global

PrivilegeId : 59f49e9a-a621-4836-8a35-b44f1f7122fb

PrivilegeName : prvAppendToConvertRule

Origin : Marketing Manager:Global,System Administrator:Global

PrincipalType : User

PrincipalName : kenichiro nakamura

BusinessUnitName : Contoso



Depth : Global

PrivilegeId : 368aff3b-95b1-45c1-bf73-01a7becdedc5

PrivilegeName : prvAppendToCustomerOpportunityRole

Origin : Salesperson:Global

PrincipalType : Team

PrincipalName : TeamA

BusinessUnitName : Contoso

...





RELATED LINKS