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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How to implement functionality with impersonation?

(0) ShareShare
ReportReport
Posted on by 6

Hello All Experts,

Can anyone help me in achieving the below functionality.

1. Creation of the Customer Portal such that customer can log in and 

      i. Create a case and send to mscrm.

      ii. Get the current status of the case.

2. This user will not be having the permission on the crm application

    so want to use some another person in crm who will work on behalf of this person.

can anyone help me in implementing this type of functionality.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Emre GULCAN Profile Picture
    2,379 on at

    Hi,

    You should check this links

    msdn.microsoft.com/.../gg334744.aspx

    msdn.microsoft.com/.../gg309629.aspx

  • EmployeeOcta Profile Picture
    6 on at

    Hello Emre,

    Thanks for your suggestion.

    from the provided link i am trying to run the sample code and it asks for some information as below.

    An Active Directory connection is required. Please enter an

    LDAP path for your network in the format 'LDAP://server/DC=subdomain,DC=domain,D

    C=com'

    how to write the above things , can you let me know!!

  • Suggested answer
    M I Mostafa Profile Picture
    4,257 on at

    Hi,

    This is the path to your Active Directory Server. and DC is the domain controller. If you are not sure of these values, then you might want to speak to your network / IT team.

    Hope this helps!

    If you found my response helpful, please mark "yes" to confirm it helped you.

  • EmployeeOcta Profile Picture
    6 on at

    Hello Mostafa,

    can you give a sample example for this.

  • Suggested answer
    Emre GULCAN Profile Picture
    2,379 on at

    Hi,

    You can use basically "Microsoft.Xrm.Client" dll (download from NuGet) and modify your "app/web.config" file like this, this informations should be for administrator (I'm using like this way)

     <connectionStrings>
        <add name="myconnection" connectionString="Url=ORGANIZATIONSVC URL; Username=DOMAIN\USERNAME; Password=PASSWORD" />
      </connectionStrings>


    If you use code below, you can connect to your CRM organization with your credentials (from app/web.config)

    var connection = new CrmConnection("myconnection");
    IOrganizationService _organizationService = new OrganizationService(connection);


    If you use code below, you can impersonate with your user without credential (username / password), just use Systemuser ID 

    var connection = new CrmConnection("myconnection");
    connection.CallerId = Guid.Parse("IMPERSONATED SYSTEMUSER ID");
    IOrganizationService _organizationService = new OrganizationService(connection);


  • EmployeeOcta Profile Picture
    6 on at

    One Question here.

    The person who is accessing the external website will be the contact in the crm.

    Now if he is the only contact then how can we impersonate , unless he has got the accessibility to the crm.

    a simple contact do not have AD account.

    can anyone help me in finding the correct solution for such requirement?

  • Emre GULCAN Profile Picture
    2,379 on at

    Hi,

    You can only impersonate with "Systemuser", you cannot use other entities (like contact). For your question, you can create a case record and set "customer" field with your contact record.

  • EmployeeOcta Profile Picture
    6 on at

    Hello Emre,

    i want to allow the individual crm contact to access the cases which belongs to  them .

    those cases will be displayed in the custom web application where the contact will login first.

  • Suggested answer
    Emre GULCAN Profile Picture
    2,379 on at

    Hi,

    Do you want use "Dynamics Portal" or custom developed website for this?

    Actually I'm new-bee about Dynamics Portals but there are more options about this (you should do your settings with Entity Permissions / Scopes, Views etc), this document helps you 

    If you create a custom web application, just create a Query (fetch or QueryExpression) and send your customer ID to your service to retrieve data.

  • EmployeeOcta Profile Picture
    6 on at

    Hello Emre,

    I want to use custom developed website.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans