Views:

Description

Retrieves an oAuth token using the following endpoint: https://login.microsoftonline.com/directoryid/oauth2/token

Signature

AzureADGetToken('directoryid', SetRequestParams ('params'))

Example

Example : Grant Type = client_credentials

AzureADGetToken('6e77330d-7376-4348-aacb-80aff5bee2d8',
                SetRequestParams('client_id', '557c67b7-b07b-4c6f-bd26-fa70f8c8f27c',
                                 'client_secret', 'I:mH%Eu888:IWa;FOf',
                                 'grant_type', 'client_credentials'))

Example : Grant Type = password

AzureADGetToken('6e77330d-7376-4348-aacb-80aff5bee2d8',
               SetRequestParams('resource', 'https://north52.api.crm4.dynamics.com',
                                'username', 'billgates@north52.com',
                                'password', 'mypassword',
                                'client_id', '997c67b7-b07b-4c6f-bd26-fa70f8c8f27c',
                                'client_secret', 'I:mH%Eu99O:IWa;FOf',
                                'grant_type', 'password' ))

Note: To find your Directory ID:

  • Login to Azure
  • Click on Azure Active Directory
  • Click on Properties

== $0

Parameters

Name Type Description Required
fromdate xxxx xxxx xxxx
todate xxxx xxxx xxxx
interval xxxx xxxx xxxx

Notes: