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)

Personal views charts dashboards - Impersonation not working

(0) ShareShare
ReportReport
Posted on by 107

Hello,

I'm trying to share all personal views, charts and dashboards with a giving user, however, I notice that the impersonation is not working when I try to rerieve the complete list.

Here is an example of what i'm using : 

Entity systemUser = _serviceProxy.Retrieve("systemuser", new Guid("eb626e45-985b-e411-a45f-005056bc742c"), new ColumnSet(true));

                        _serviceProxy.CallerId = systemUser.Id;
                        Entity chartt = _serviceProxy.Retrieve("userqueryvisualization", new Guid("31735de8-b994-e711-bdb1-005056bc1180"), new ColumnSet(true));


Any help please ?

I tried with the XRMToolbox plugin of a33ik but it has the same problem. The result is different depends on the connected user.

Thank you

*This post is locked for comments

I have the same question (0)
  • a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Questions:

    Does user with id "eb626e45-985b-e411-a45f-005056bc742c" owns chart with id "31735de8-b994-e711-bdb1-005056bc1180"? Is that correct understanding?

    If you want only share - what's the point of retrieval of chart record when you already have Id of it?

    BTW goal of my plugin is not sharing of records but transferring of records between environments.

  • Sskod Profile Picture
    107 on at

    thank you for the reply,

    Does user with id "eb626e45-985b-e411-a45f-005056bc742c" owns chart with id "31735de8-b994-e711-bdb1-005056bc1180"? Is that correct understanding?

    =====> Yes he does, but the error is showing the the callinguser is the one who launched the program.

    If you want only share - what's the point of retrieval of chart record when you already have Id of it?

    =====> I want to export the list of all personal views/charts in my CRM, then decide if I export or share with anther user

    BTW goal of my plugin is not sharing of records but transferring of records between environments.

  • a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Ok. What error does your user get?

  • Sskod Profile Picture
    107 on at

    Here is the error message:

    SecLib::AccessCheckEx failed. Returned hr = -2147187962, ObjectID: 31735de8-b994-e711-bdb1-005056bc1180, OwnerId: eb626e45-985b-e411-a45f-005056bc742c,  OwnerIdType: 8 and CallingUser: a76b8c9f-8bf1-e811-9792-000d3a955007. ObjectTypeCode: 1112, objectBusinessUnitId: 18edb771-c002-e411-958a-005056bc7423, AccessRights: ReadAccess

  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Based on the error description I assume that mentioned user doesn't have privileges to read Personal Charts at all. Give privileges to user and that should work fine - that privilege is located in "Core Records" tab of security role, User Chart entity.

  • Sskod Profile Picture
    107 on at

    Both users are system administrators ( they have the role System Administrator)

  • Sskod Profile Picture
    107 on at

    any idea please?

  • a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Be patient, please. I'm not earning any penny answering questions on the forum.

    Your code looks good for me. That means reason in something other.

  • RaviKashyap Profile Picture
    55,410 Moderator on at

    Hi,

    As suggested by Andrew, the error message is due to missing privileges. Can you try create charts in CRM UI and see if it works for these 2 users?

  • Sskod Profile Picture
    107 on at

    Hi,

    @andrew  I'm aware of that, it's just a major problem for me actually.

    @ravi kashy I've just noticed that it works for newly created personal views and not old ones ( old ones has been created in an environnement A and they are visible in my current environnement B because I've imported the organization recently).

    Thank you

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