Monday, March 25, 2019

How to get a graph API token in Postman tool

1) Open postman native application from desktop
2) Go to authorization tab
3) Click "Get new access token"

4) Fill the following properties

Auth URL :  

https://login.microsoft.com/(Tenant ID)/oauth2/v2.0/authorize

Access Token URL :

https://login.microsoft.com/(Tenant ID)/oauth2/v2.0/token

Scope: 

https://graph.microsoft.com/.default

Grant Type:

Client Credentials





5) Click Request token

6) You will receive the token under the existing token



7) Select Add token to header as shown in above image and click use token

8) You are ready to run graph APIs from postman


How to get Tenant ID?
1) Get your Tenant ID from Azure AD. Choose Properties - your Tenant ID is the Directory ID

How to get Client ID?
1)  You have to register your app in Azure. https://docs.microsoft.com/en-us/graph/auth-v2-service#4-get-an-access-token

How to get Secret key?
2) You have to register your app in Azure https://docs.microsoft.com/en-us/graph/auth-v2-service#4-get-an-access-token

Wednesday, February 6, 2019

How to use filter query in get items in Microsoft Flows

You can  use filter query option to filter the data in Microsoft flows

e.g. I want to filter the data where expiry date not equal to null. You can do it by following way

1) Expand the advance options
2) Enter the condition as shown in below image Epirydate ne null



1) NE = Not equal to
2) EQ = Equal to
3) LEQ = Lest than equal to
4) GEQ = Greater than equal to

Tuesday, February 5, 2019

Use AND, OR expression in flow conditions

Usually in Microsoft flows you can add only one condition in basic mode. There are no options to add expression like AND, OR. To use these expressions go to advance mode and use the AND, OR . e.g.

I want to use a condition

if (contract value is < 100000 and standard term = 'Yes' )
then
      Do this
else
      Do else


1) To use it in the flows enter the first condition in basic mode, go to advance mode and  copy it in notepad
2) Delete the first condition
3) Apply the second condition, go to advance mode and  copy it in notepad

Create the condition yourself with @and

@and
(
     lessOrEquals(body('Get_item')?['Contractvalue'], 100000),
     equals(body('Get_item')?['standardterms']?['Value'], 'Yes')
)

NOTE: remove all other @ signs from conditions expect with @and



1) Paste the created condition in MS flows condition box in advance mode and you are done.
2) Save the flow and see it is not showing any errors


For more information please use the following URL