3

I need to use MS Identity Platform with a Delphi desktop VCL program to log into an Azure SQL DB. I have read and mostly understood https://learn.microsoft.com/en-us/azure/active-directory/develop/. There are multiple Quick Start examples for other languages. I got the Visual Studio C# example running for Graph. Does anyone have a working example of doing this with Delphi?

I have a Delphi program working fine with an Azure SQL DB, but must have an IP address listed in the DB firewall to connect. This is not practical when working outside the office, moving around. I would like to leverage Single-Sign-On instead.

Debby
  • 53
  • 6
  • Is not VPN a simpler solution to your problem? – Dsm Sep 24 '20 at 08:01
  • No, there is no server or network to log into. Each user has stand-alone workstation. Tiny non-profit orgs with limited funds, only 1 paid staff per org, all $ spent on food/supplies, not IT. – Debby Sep 25 '20 at 04:16
  • @Debby What kind of solution did you end up using? – Dave Nottage Jan 11 '21 at 03:02
  • The "Acquire an access token" section here seems to indicate that MSAL is an *alternative* to just using the REST APIs: https://learn.microsoft.com/en-us/rest/api/azure/ – Dave Nottage Jan 11 '21 at 03:28
  • so far my users are getting by with IP addresses added to firewall. That won't work forever. The 2-minute video you point to about using APIs directly looks promising. Between that and the online Visual Studio example I may get somewhere! If I finally get something working I'll post it. If you are a Delphi programmer and want to make a quick $50, I'll happily pay for a working Delphi example. – Debby Jan 11 '21 at 17:50

1 Answers1

0

One option is to use still use .NET, but to call it from COM in Delphi.

See: https://blogs.embarcadero.com/using-a-net-assembly-via-com-in-delphi/

keegan
  • 16
  • 1
  • I'm afraid this is a bit beyond my skills. I am a database architect who really appreciates the fact that Delphi allows me to avoid a lot of systems stuff. The QuickStart examples are easy to understand and appear to be exactly what I want. I just need to right syntax for Delphi. But thanks for taking the time to respond. – Debby Oct 04 '20 at 02:25