Run User Diagnostics in Power Platform Admin Center | Solving User Access Issues for Dynamics CRM

Many users often reports issue of not being able to access Dynamics 365 CRM even when they’ve been assigned security roles.

So, Power Platform Admin Center will provide you a Diagnostic Tool to quickly check what type of access is missing at the administration level across the below areas –

  1. Sign in blocked for the User at M365 level.
  2. No license for Power Apps / CE Apps.
  3. Not in Security Group of the Dataverse/CRM environment

Let’s see how we can run the Diagnostics and how to solve each of them!

Run Diagnostics on Users

Here’s how you can Run the Diagnostics on the Users in Power Platform Admin Center –

  1. Navigate to the Settings once you select the Environment –

  2. Then, expand the Users + permissions area to see the Users option

  3. Once you see all the Users, you’ll be able to see which Users you want to select and then investigate for diagnostics.

  4. When you click on Run Diagnostics, you’ll see the pan on the right hand side complete some tests and then show the results –

  5. And when you zoom, you’ll see the information as below –

  6. So, when you check the License information in the M365 Portal (considering you have Admin access), you’ll identify that the User is missing the license for Power Apps / Customer Engagement Apps.

  7. When I run this for User whose all levels of access are correct, I’ll see the below –

  8. In other instances, the Sign-in could be blocked as well and this is how it’ll appear. The error message will point out what is causing the User to not access the Dataverse environments.

  9. And when you check the User in the M365 Admin Center, you’ll see that the Sign-in is blocked –

  10. And a final reason that a User is not a part of the Security Group which has been assigned to the Environment itself.
    In that case, they’ll see the below error –

  11. So, if you check the Environment in PPAC itself, you can see what Security Group has been applied to the Environment.

  12. And if you look at this Group, you’ll not find the member in the Security Group at the M365 Level.

You can find the complete Microsoft Learn documentation on the same here – https://learn.microsoft.com/en-gb/power-platform/admin/troubleshooting-user-needs-read-write-access-organization#user-diagnostics?WT.mc_id=DX-MVP-5003911

Hope this helps!

Here are some Power Automate posts you want to check out –

  1. Select the item based on a key value using Filter Array in Power Automate
  2. Select values from an array using Select action in a Power Automate Flow
  3. Blocking Attachment Extensions in Dynamics 365 CRM
  4. Upgrade Dataverse for Teams Environment to Dataverse Environment
  5. Showing Sandbox or Non Production Apps in Power App mobile app
  6. Create a Power Apps Per User Plan Trial | Dataverse environment
  7. Install On-Premise Gateway from Power Automate or Power Apps | Power Platform
  8. Co-presence in Power Automate | Multiple users working on a Flow
  9. Search Rows (preview) Action in Dataverse connector in a Flow | Power Automate
  10. Suppress Workflow Header Information while sending back HTTP Response in a Flow | Power Automate
  11. Call a Flow from Canvas Power App and get back response | Power Platform\
  12. FetchXML Aggregation in a Flow using CDS (Current Environment) connector | Power Automate
  13. Parsing Outputs of a List Rows action using Parse JSON in a Flow | Common Data Service (CE) connector
  14. Asynchronous HTTP Response from a Flow | Power Automate
  15. Validate JSON Schema for HTTP Request trigger in a Flow and send Response | Power Automate
  16. Converting JSON to XML and XML to JSON in a Flow | Power Automate

Thank you!

Get Data sent to server on Save using Dynamics 365 CRM JavaScript | GetDataXML function

Now, in case you are working on forms in Dynamics 365 CRM, and you want to know what all data is changed – There are 2 ways to get this

Scenario

Let’s look at the below scenario where this is useful –

  1. You have a record which you are about to Edit. This is how it looks as of now.

  2. Now, I have an OnSave event on which I’m calling a function to capture what all is being saved.

  3. Now, below is what I want to change and then click Save to save the changes.

  4. And then click Save. Now, I want to capture all this data upon Saving to know and further process what has been changed. Let’s see how we can achieve this using Dynamics 365 CRM JavaScript

getDataXml() method

Here’s how you will see the data to be changed

  1. Below, you see that I’m using formContext.data.entity.getDataXml(); to get the data that was changed and which will be setn to the server to saving/processing.
    Please note that here, I’ve used formContext as my variable to store the context passed from the Save event on the form.


    Here’s the code for you to copy and change for yourself –  var xmlData = formContext.data.entity.getDataXml();
  2. Now, when I run this on the Dev Tools in the Browser, I can see what is being populated when I save the record.



  3. Once I hit debugger, I’ll get the same in the variable I created.


  4. And when I run this variable in the Console to see the complete data, I get this in XML.


  5. And that’s how you can capture data in Dynamics 365 which is being sent to the server for processing/saving.

Hope this helps!

Here are some Power Automate posts you want to check out –

  1. Select the item based on a key value using Filter Array in Power Automate
  2. Select values from an array using Select action in a Power Automate Flow
  3. Blocking Attachment Extensions in Dynamics 365 CRM
  4. Upgrade Dataverse for Teams Environment to Dataverse Environment
  5. Showing Sandbox or Non Production Apps in Power App mobile app
  6. Create a Power Apps Per User Plan Trial | Dataverse environment
  7. Install On-Premise Gateway from Power Automate or Power Apps | Power Platform
  8. Co-presence in Power Automate | Multiple users working on a Flow
  9. Search Rows (preview) Action in Dataverse connector in a Flow | Power Automate
  10. Suppress Workflow Header Information while sending back HTTP Response in a Flow | Power Automate
  11. Call a Flow from Canvas Power App and get back response | Power Platform\
  12. FetchXML Aggregation in a Flow using CDS (Current Environment) connector | Power Automate
  13. Parsing Outputs of a List Rows action using Parse JSON in a Flow | Common Data Service (CE) connector
  14. Asynchronous HTTP Response from a Flow | Power Automate
  15. Validate JSON Schema for HTTP Request trigger in a Flow and send Response | Power Automate
  16. Converting JSON to XML and XML to JSON in a Flow | Power Automate

Thank you!

Read OptionSet Labels in Dynamics 365 CRM Plugins | Entity object

Usually, you’d look at the OptionSet in the customiation and decide to write plugin logic based on the code you have noted down.

But, at times, you might want to know what the OptionSet Labels are for these Options, in that case, here’s how you retrieve the labels as well.

In case you are looking to retrieve OptionSet Labels in Power Automate Flow on the Dataverse connector, you can check this post – Read OptionSet Labels from CDS/Dataverse Triggers or Action Steps in a Flow | Power Automate


Scenario

Below is the OptionSet Value and you want to retrieve the Label part when you retrieve or work with RetrieveMultiple or object of the Entity class in Dynamics 365 CRM plugin execution context


OR

And here’s the Data that I’ll be retrieving in my plugin of which I need the label “Silver” instead of the OptionSet value of 1 as seen above.

OptionSet Value

Amongst some methods, I prefer using the below to retrieve the OptionSet Value i.e. the code itself

  1. Lets say I’m looping through a list of records retrieved using RetrieveMultiple in my plugin.
    I use entity.GetAttributeValue<OptionSetValue>("field_name").Value; to retrieve the value of the OptionSet option and store it in an Int32 / int variable.


  2. But, this doesn’t give you the Name of the label itself. For that, you’ll need to use a different method. Let’s see below

OptionSet labels using Formatted Values

Below is how you can retrieve Label of the OptionSet value from the Object of the Entity class in Dynamics 365 CRM plugin execution context –

  1. Similar to the above step, I’m retrieving the name of the Label of the same OptionSet value I’m working on from the same example above.
    I use entity.FormattedValues["field_name"]; to retrieve the Label of the OptionSet option and store it in a String / string variable.

Here’s where all the other Formatted Values are stored in the RetrieveMultiple’s Object

And that’s how you retrieve the OptionSet Labels in your Dynamics 365 CRM plugin.

Hope this helps!

Here are some Power Automate posts you want to check out –

  1. Select the item based on a key value using Filter Array in Power Automate
  2. Select values from an array using Select action in a Power Automate Flow
  3. Blocking Attachment Extensions in Dynamics 365 CRM
  4. Upgrade Dataverse for Teams Environment to Dataverse Environment
  5. Showing Sandbox or Non Production Apps in Power App mobile app
  6. Create a Power Apps Per User Plan Trial | Dataverse environment
  7. Install On-Premise Gateway from Power Automate or Power Apps | Power Platform
  8. Co-presence in Power Automate | Multiple users working on a Flow
  9. Search Rows (preview) Action in Dataverse connector in a Flow | Power Automate
  10. Suppress Workflow Header Information while sending back HTTP Response in a Flow | Power Automate
  11. Call a Flow from Canvas Power App and get back response | Power Platform\
  12. FetchXML Aggregation in a Flow using CDS (Current Environment) connector | Power Automate
  13. Parsing Outputs of a List Rows action using Parse JSON in a Flow | Common Data Service (CE) connector
  14. Asynchronous HTTP Response from a Flow | Power Automate
  15. Validate JSON Schema for HTTP Request trigger in a Flow and send Response | Power Automate
  16. Converting JSON to XML and XML to JSON in a Flow | Power Automate

Thank you!

Microsoft Authenticator app sign-in method types for Microsoft 365 account | Office 365

In case you are setting Authenticator app for accessing your Office 365 account, you have 2 options of authenticating using the Authenticator App from you phone – Notification based and Code based. And see how you can change the preferred method to either of these types!

Notification Based

Here’s how the notification based authentication works –

  1. When you enter your username and password, you’ll see this on your browser intimating that the Approval request has been sent to your phone.

  2. On the phone, you’ll receive the below

  3. And upon opening the notification, the Microsoft Authenticator App will be opened and the permission to Approve or Deny the authentication request for your account will pop-up.

  4. Once you click on Approve, you’ll be able to login.

Code Based

And when Code based method is selected, you’ll see the below –

  1. On the browser when you enter your username and password, you’ll see the below waiting for you to refer to the Authenticator App and enter the same from your phone.



  2. Once you open the Authenticator App and open the Account which you are trying to log in, you’ll see a code in bold letters which refreshes after a time frame.

  3. Once you enter this code, you’ll be able to log in.

Changing the Authentication Method

Here’s how you can change the type of authentication method when you log into your Office 365 –

  1. Navigate to the menu on the top right.

  2. Now, on the left hand side, look for Security Info.

  3. You can then see the different authentication methods you’ve entered like phone, authenticator app etc.
    For simplicity, I only have 1 entered i.e. Authenticator App [Microsoft Authenticator].

    And now, since Microsoft Authenticator is set as the default method, I’ll also get an option to change the type of authentication set.

  4. I’ll get two options –
    “App based authentication – notification” – This will show a pop-up on the phone in the form of a notification which you can choose to Approve or Deny.
    “App based authentication or hardware token – code” – This will need you to open the Microsoft Authenticator Apps in your phone and then look for the code in the account and enter it when asked as seen in this post above.

  5. So, you can select the other method apart from the one you have selected and you should be good to go.


Hope this helps!

Here are some Power Automate posts you want to check out –

  1. Select the item based on a key value using Filter Array in Power Automate
  2. Select values from an array using Select action in a Power Automate Flow
  3. Blocking Attachment Extensions in Dynamics 365 CRM
  4. Upgrade Dataverse for Teams Environment to Dataverse Environment
  5. Showing Sandbox or Non Production Apps in Power App mobile app
  6. Create a Power Apps Per User Plan Trial | Dataverse environment
  7. Install On-Premise Gateway from Power Automate or Power Apps | Power Platform
  8. Co-presence in Power Automate | Multiple users working on a Flow
  9. Search Rows (preview) Action in Dataverse connector in a Flow | Power Automate
  10. Suppress Workflow Header Information while sending back HTTP Response in a Flow | Power Automate
  11. Call a Flow from Canvas Power App and get back response | Power Platform\
  12. FetchXML Aggregation in a Flow using CDS (Current Environment) connector | Power Automate
  13. Parsing Outputs of a List Rows action using Parse JSON in a Flow | Common Data Service (CE) connector
  14. Asynchronous HTTP Response from a Flow | Power Automate
  15. Validate JSON Schema for HTTP Request trigger in a Flow and send Response | Power Automate
  16. Converting JSON to XML and XML to JSON in a Flow | Power Automate

Thank you!

Adding Editable Grid using the New Power Apps Grid Control in Model-Driven Apps | [Preview]

If you are designing your forms in the Model-Driven Apps designer from the Power Apps Maker i.e. https://make.powerapps.com/, here’s how you can add the New Power Apps Grid (which is in Preview at the time of writing this post)

Scenario

For example, you are in Model Driven Apps designer and you are see the existing Grids, they have only 2 areas in Properties –

  1. Select the Grid and you’ll only see 2 areas –


  2. And if you expand them, you won’t find a way to change the control to, for example, Editable Grid.

  3. That’s where the new Power Apps Grid Control comes hand. This is currently in Preview at the time of writing this post.

New Power Apps Grid Control [Preview]

Now, click on the Components section to reveal all the Components that you could add to the Model-Driven Apps form –

  1. You’ll see the More Components section under which you’ll find the new Power Apps Grid Control.

  2. Now, once you drag is on the form where you want it to be, you’ll be asked to select the records it should hold. It’ll ask you to select the Table which you want to display in the sub-grid.

  3. Once you click on Done, make sure the Show Related Records is selected as well and ensure the Table and View selected is correct.

  4. Now, look for Components section and expand the same. Expanding the Components, you’ll be able to select the Editable Grid.
    Expand the Components section and you’ll find another button to add more components that are made available.

  5. Now, you’ll be able to select the Editable Grid here.

  6. Now that you have added Editable Grid, click Done.

  7. And once you add, you’ll notice that the Mobile, Web etc will be shown under the new grid. Means this is now set as default and not the other 2 views.

  8. Finally, you can save your changes and publish.
    And that’s how you are able to add Editable Grid on the modern Power Apps Model Apps designer using the new Power Apps Grid Component.

  9. And here’s how you’ll be able to add an Editable Grid on the Form using new Power Apps maker.

Here’s the Microsoft Learn link for the same – https://learn.microsoft.com/en-us/power-apps/maker/model-driven-apps/the-power-apps-grid-control?WT.mc_id=DX-MVP-5003911

Hope this helps!

Here are some Power Automate posts you want to check out –

  1. Select the item based on a key value using Filter Array in Power Automate
  2. Select values from an array using Select action in a Power Automate Flow
  3. Blocking Attachment Extensions in Dynamics 365 CRM
  4. Upgrade Dataverse for Teams Environment to Dataverse Environment
  5. Showing Sandbox or Non Production Apps in Power App mobile app
  6. Create a Power Apps Per User Plan Trial | Dataverse environment
  7. Install On-Premise Gateway from Power Automate or Power Apps | Power Platform
  8. Co-presence in Power Automate | Multiple users working on a Flow
  9. Search Rows (preview) Action in Dataverse connector in a Flow | Power Automate
  10. Suppress Workflow Header Information while sending back HTTP Response in a Flow | Power Automate
  11. Call a Flow from Canvas Power App and get back response | Power Platform\
  12. FetchXML Aggregation in a Flow using CDS (Current Environment) connector | Power Automate
  13. Parsing Outputs of a List Rows action using Parse JSON in a Flow | Common Data Service (CE) connector
  14. Asynchronous HTTP Response from a Flow | Power Automate
  15. Validate JSON Schema for HTTP Request trigger in a Flow and send Response | Power Automate
  16. Converting JSON to XML and XML to JSON in a Flow | Power Automate

Thank you!