seanmcne / Microsoft.Xrm.Data.PowerShell

This module uses the CRM connection from Microsoft.Xrm.Tooling.CrmConnector.Powershell and provides common functions to create, delete, query, and update data as well as functions for common tasks such as publishing, and manipulating System & CRM User Settings, etc. The module should function for both Dynamics CRM Online and On-Premise environment.
204 stars 65 forks source link

Add-CrmSecurityRoleToTeams #487

Closed awshaik closed 2 years ago

awshaik commented 2 years ago

Hi Is it possible to add some bulk CRM security roles to different teams by using powerShell.

If yes, please share inputs.

thanks

seanmcne commented 2 years ago

Yep, you can use Add-CrmSecurityRoleToTeam to add roles, you can also query user or team roles, etc.

Here is one example which gets all of a users roles and removes them - you can use similar approaches to query roles and add them to another user.

https://github.com/seanmcne/Microsoft.Xrm.Data.PowerShell.Samples/blob/28dd323b4ff55498a97640a55bfc96649ec1c7e1/UserOperations/Role_RemoveRoleFromAllUsers.ps1

awshaik commented 2 years ago

Thankyou for example.

I will work on that.

Shaik.

On Fri, 15 Oct 2021 at 19:59, Sean McNellis @.***> wrote:

Closed #487 https://github.com/seanmcne/Microsoft.Xrm.Data.PowerShell/issues/487.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/seanmcne/Microsoft.Xrm.Data.PowerShell/issues/487#event-5470206441, or unsubscribe https://github.com/notifications/unsubscribe-auth/AR2OLI7HWAA6GUZWU76SE23UHA3FTANCNFSM5F7TXRWQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.