Updating Entity Reference Power Automate vs Plugin


Vrushali Ranjalkar's avatarVrushali's Techno Blog

Recently I worked on a project where not a single line of code was allowed. It was only configuration project. I had a requirement to create number of custom tasks at run time based on the task template. Since plugin was not allowed, used Power Automate(Flow).

While I started working on power Automate, I had to check the syntax for all small things which are on my finger tips when I write the plugin. Hence thought of posting about such syntaxes. Here are few quick help when we create a power automate instead of plugin.

Updating entity reference field

in Plugin if I am updating the regarding field of the task with the case ID

ActivityEntity.regardingobjectid= new EntityReference("incident", targetIncident.Id);

If we want to do same thing in Power Automate, we need to set it in different way

We need to either enter something like below

incidents(Guid) or /incidents/Guid

Updating Owner…

View original post 134 more words

Fixed – 401 Unauthorized error while calling Dynamics 365 Web API


We were recently getting the below error while trying to call Dynamics 365 Web API through Postman.

“401 Unauthorized”

It turned out that we were using the incorrect Token.

To generate the correct token,

For OAuth 2.0 token endpoint (v1) Version 1

  • We need to specify resource with Dynamics 365 URL.


For OAuth 2.0 token endpoint (v2) Version 2

  • We need to specify scope with
    Dynamics 365 URL followed by .default instead of a resource.

The correct token results in the successful call to the Web API

References –

https://matthijs.hoekstraonline.net/2020/04/27/v1-and-v2-identity-and-access-tokens-with-azure-active-directory/

https://crmchap.co.uk/generating-oauth2-v2-0-endpoint-tokens-for-dynamics-365-the-common-data-service/

Hope it helps..

Advertisements

How to – Read Secret from Azure Key Vault using Key Vault Rest API through Postman


In the previous posts, we saw how to register an Azure AD app and read the secret from Azure Key Vault using SecretClient and UsernamePasswordCredential class

In this post, we’d fetch the secret saved in Key Vault through Postman.

  • Register an Azure AD App
  • Copy its client id and client secret
  • Provide the Get Secret permissions to the application for the Key Vault.

Within Postman we’d first fetch the token

Get the URL from endpoints

Format – https://login.microsoftonline.com/{tenantid}/oauth2/v2.0/token

Scope value – https://vault.azure.net/.default

Send the request which responds with the token.

Copy the token

Create the new Get request and pass the Secret identifier with the API version.

https://mykvcrm.vault.azure.net/secrets/MySecret/f046535ef5644ca5a4b43f2a718776b9?api-version=7.1

For authorization select type as Bearer Token and paste the token generated earlier.

Send the request to get the secret’s value as shown below – “itissecret”

Get more details here –

https://docs.microsoft.com/en-us/rest/api/keyvault/getsecrets/getsecrets

Hope it helps..

Advertisements

How to – Check user’s access to a record – upcoming feature in Dynamics 365


Was going through the Model-Driven Apps documentation and found the below article

https://docs.microsoft.com/en-us/powerapps/user/access-checker

It talks about a Check access button on the command bar of a record which will list down all the rights/access/privileges on that particular record.

And also how the user has got those accesses, through security roles directly assigned or through the team the user belongs.

We can also check the access of the other users as well through user lookup.

More on Access in Dynamics 365

Hope it helps..

Advertisements
Advertisements

How to trigger Power Automate flows from Model-Driven Power App Business Process Flows (and get a response!)


Nick Doelman's avatarThe ReadyXRM Blog by Nick Doelman

I was working on a project the other day and the requirement was for a user of a Model-driven Power App to go through a series of steps to approve an application with a number of data points. I am not the biggest fan of Business Process Flows, (BPFs) but I felt that it did fit this particular use case.

Business Process Flow

One of the improvements of Business Process Flows in recent years is the ability to run an “Action Steps“. You add an Action Step to your stage and trigger either an Action or a classic Dataverse Workflow. In this case, if the organization submitting the application did not yet exist in Dataverse, the users could run a Workflow to create the Account record (and the workflow could update the application record Account lookup).

NAME CHANGES In case you have been living under a…

View original post 787 more words

Fixed – Repairing disk errors. This might take over an hour to complete – Windows 10


Hi all, sharing the recent experience with the below error

A couple of days back my laptop, unfortunately, got slipped from my hand, and then on starting the laptop gave the below messages

  • “Preparing automatic repair.” then
  • “Diagnosing your PC.” then
  • “Repairing disk errors. This might take over an hour to complete.”

After waiting for almost 6 hours, the message was still the same.

Another error that I got performing the Hard drive self-test from BIOS was

“Hard Disk Short DST: Failed”

Restarting and trying the below Advanced Options also didn’t work

There was no restore point found, the factory reset also failed.

Reset continued till 30 % and then rolled back.

Running in safe mode brought the same Repairing disk error message.

Running check disk command

chkdsk c: /r and /f displayed

File record segment is an unreadable error.

The only option left was to take it to the local repair shop who checked the health of the disk which was showing around 57 %.

The only fix that worked here was a clean install of Windows 10 and considering the health of the disk eventually replaced the disk as well. (HDD with SDD)

Hope it helps..

Advertisements