web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Get username and password of the currently logged-in user in CRM and pass it to the plugin firing on create of

(0) ShareShare
ReportReport
Posted on by

Hi,
I am integrating CRM Online and SharePoint Online. Right now I am using Office365 trial version for both. Hence, the same username and password works for both.

I want to create sub-site in SharePoint on create of an entity record. Currently, I am passing the admin credentials. But, I want to pass the credentials of the currently logged-in user in CRM to the plugin which is getting executed on create of account entity. So that I can then create sub-site in SharePoint using the current user credentials instead of admin credentials.
Is there way to achieve this?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Mithilesh Kumar Profile Picture
    10,047 on at

    Hi Purva,

    When you Register a step to the Plugin, you can provide the User's Context. Shown below

    You may also use impersonation in your Plugin Code.

    Hope that helps

    Thanks

  • Aileen Gusni Profile Picture
    44,524 on at

    HI Purva,

    You can get the Username from the context.InitiatingUserId, but you can't get the password

    stackoverflow.com/.../access-current-user-credentials-in-crm-2011-on-demand-workflow

    stackoverflow.com/.../how-to-get-the-impersonated-user-id-in-a-plugin

    rajeevpentyala.wordpress.com/.../userid-initiatinguserid-properties-in-plugin-of-crm

    Try you another field to store the current user, while when access to create folder in SPS, you use the Administrator.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
ScottDurow Profile Picture

ScottDurow 2

#2
GJones Profile Picture

GJones 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans