By Admin on Thursday, 26 May 2022
Category: All

Delphi Microsoft Azure SDK

​Microsoft Azure is a cloud computing service operated by Microsoft for application management via Microsoft-managed data centers. It provides software as a service (SaaS), platform as a service (PaaS) and infrastructure as a service (IaaS) and supports many different programming languages, tools, and frameworks, including both Microsoft-specific and third-party software and systems.

Our sgcOpenAPI Client Parser can read the OpenAPI / Swagger Amazon AWS specifications and create automatically client interfaces in 100% pascal code, so it can be integrated in any Delphi, CBuilder or Lazarus Application.

You can check here the full list of more than 650 Microsoft and Azure Services:

https://www.esegece.com/openapi/apis/azure-sdk

https://www.esegece.com/openapi/apis/microsoft-sdk

The list includes popular services like:

Microsoft Azure Client 

The sgcOpenAPI Microsoft Client (TsgcOpenAPI_Microsoft_Client) has it's own OpenAPI Client which inherits from TsgcOpenAPI_Client.

This component has a property called MicrosoftOptions that includes all required configurations to connect to Microsoft Servers.

MicrosoftOptions

The OpenAPI Microsoft client allows to authenticate using the following methods:

  1. OAuth2 Code: is interactive, which means requires the intervention of the user.
  2. OAuth2 Credentials: is non-interactive, so can run as a service for example.

The authentication is configured in the property MicrosoftOptions.Authentication, allows the following values:

Other properties required by Microsoft are the following:

OAuth2 Credentials 

Using OAuth2 Code Grant Flow doesn't requires interaction with the user, so is suitable for services, daemons... or any application that must run without user interaction.

Once you have the Tenant Id and the Credentials, you can configure the OAuth2 properties for Code Grant.

To configure the OpenAPI Client for OAuth2 Code Grant, configure the property MicrosoftOptions.Authentication with the following value:

The Tenant ID must be configured for the Authentication and Token URLs, just replace the correct Tenant Id in the url.

Microsoft only allows the URL localhost if you are listening in the Local IP, so set the redirect URL with localhost as dns name instead of configure with the IP address.

The scope value depends of the API, check the Microsoft / Azure documentation for every API.

OAuth2 credentials doesn't require any user interaction, so no browser will be opened the first HTTP request call.

Delphi Microsoft Azure SDK Video 

Delphi Azure SDK

Delphi Microsoft SDK

Related Posts