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 fetch user owned dashboards for a different user???

(0) ShareShare
ReportReport
Posted on by 5

Hi all,

I am recently facing this issue as i am trying to query userform entity to fetch all the personal dashboards of a particular user using below query in my console application.

The problem is that the query is working fine when i am giving the same user credentials for crm to connect to my console application as for the user which i want to retrieve the personal dashboards i.e the ownerid for the owner of personal dashboards but when i am giving the different ownerid for the user to retrieve its dashboards than it is not returning its dashboards. It is returning the entity count as 0.

QueryExpression query = new QueryExpression("userform");
query.ColumnSet.AddColumns("name", "userformid", "ownerid", "type");
query.Criteria.AddCondition("ownerid", ConditionOperator.Equal, "00000-0000-0000-0000-00000000000");
query.Orders.Add(new OrderExpression("name", OrderType.Ascending));

EntityCollection personalDashboardsCollection = _service.RetrieveMultiple(query); // retrieve collection of personal dashboards...

Thanks in advance!! :)

*This post is locked for comments

I have the same question (0)
  • TylerS.Dev Profile Picture
    729 on at

    I think there is credential issue involved as other user do not have the permission to access personal view.  Have you try to re-create it as system view, or share access of this personal view to the new user you intend to grant access to?

  • amandeep.singh Profile Picture
    5 on at

    Hi Tyler,

    Many thanks for responding back.

    I have tried giving the user system admin role as well. Actually what i think the issue is that it is only fetching the personal dashboards if the user is same as the logged in user of Crm otherwise it is returning the count as 0 for other user. As personal dashboards and views cannot be accessed by other users except the one owner. Because when i changed the login credentials i was able to fetch its dashboards also.

    Actually the user for which we want to fetch the personal dashboards has left the organisation so we don't have credentials for that user so we want to retrieve those dashboards and change their owner to some other user

  • Suggested answer
    TylerS.Dev Profile Picture
    729 on at

    Actually, you could share the personal dashboard by having the owner of that dashboard to log in, go to that dashboard and choose SHARE DASHBOARD ribbon.

    36557.Capture.PNG

    You can modify read/write permission given to each individual user.  You also have to make sure the other user have access to the entities and fields used in the dashboard or the records will not be returned.

  • amandeep.singh Profile Picture
    5 on at

    The owner has left the organisation we don't have its credentials that's why i want to retrieve his dashboards and assign it to some other users.

  • TylerS.Dev Profile Picture
    729 on at

    I see, is this cloud environment?  If it is, the user credential should be governed by office 365 admin portal under user, you should be able to reset the password and access his account.

  • amandeep.singh Profile Picture
    5 on at

    Basically i want to do it for on premise 365..

  • Suggested answer
    Kokulan Profile Picture
    18,054 on at

    Hi Amandeep

    I think you could consider one of the two options below

    01. Ask your domain or system admin to reset the password for that AD account and log in as that user and Share the dashboard with a team or any user you would like to share it with.

    02. This option is not supported but it is a possibility. Since you are on-prem, you have direct access to SQL.  You could think about changing the owenerid of the record in dbo.UserFormBase table.  This an unsupported option, please try on a copy or test instance first. Only try this option if the Option1 is not possible at all and you desperately need access to the dashboard.

  • amandeep.singh Profile Picture
    5 on at

    Hi Kokulan,

    Thanks for responding back.

    I can't comment on your first option as i am  trying to get the account reset if possible cuz it is the best and easiest practice.

    Already tried with the second option but it was having some adverse effects cuz some users were complaining that they were facing difficulty in viewing some dashboard that's why i tried it from a console app but then i have to face the issue which i have mentioned  in the beginning.

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