11

Is there a MSAL/ADAL equivalent for C++ ? I would like to natively support getting access tokens for Azure in C++ (rather than build a bridge of some kind by using python version.)

Thank you

Rags
  • 139
  • 1
  • 4
  • According to the documentation at [https://learn.microsoft.com/en-us/azure/active-directory/develop/active-directory-authentication-libraries](https://learn.microsoft.com/en-us/azure/active-directory/develop/active-directory-authentication-libraries) (ADAL) and [Microsoft identity platform authentication libraries](https://learn.microsoft.com/en-us/azure/active-directory/develop/reference-v2-libraries) (MSAL), there is no Microsoft supported library for C++ available. – rickvdbosch Jan 13 '20 at 14:31
  • 1
    Hence the question! Is there an "equivalent" – Rags Jan 13 '20 at 14:38
  • Also regarding the down vote. It is unfair. It leaves others wondering if there was indeed any research done. As a matter of fact I did scour through plenty if github repos and sites to check if there is an "equivalent" SDK that addresses the feature that MSAL/ADAL provide.I did not find any (not open source ones at-least). My question more precisely if there was any confusion is that "I know there is no port of MSAL/ADL in C++. However do any of you know if there are other libraries out there that do the job and are written in C++?" – Rags Jan 13 '20 at 15:15
  • I'm throwing my two cents for an upvote to this. The question is, did anybody make a C++ library that allows for authentication against Azure active directory, and yes, I want one. – TJ Bandrowsky Aug 06 '23 at 17:21

2 Answers2

5

I am the current contact at Microsoft for both MSAL or ADAL C++.

Microsoft has MSAL C++ in development and it will eventually be open source. Its code is used in major products made my Microsoft. ADAL C++ is not released externally and is not open source.

Our guidance is to interop with Python or .NET at this time.

amit
  • 59
  • 1
  • 3
  • 2
    Would you happen to have an update on this? Is there an estimated timeline on when we can expect MSAL (C++) library? – Rags Nov 02 '20 at 22:30
  • What kind of bad joke is Microsoft's support for C++? – Christopher Pisz Dec 17 '20 at 16:45
  • Well, the endpoints adhere to open standards, so there is no requirement to use a Microsoft library. Microsoft just didn't prioritize ever releasing this due the lack of demand. – amit Dec 18 '20 at 18:01
  • @Rags which solution did you used to get AD working with C++ ? I´m using VS C++ 2015 – Erwan Douaille Jan 05 '21 at 14:10
  • 3
    I ended up composing a library in C using Go FFI (CGo) for the MSAL Go package https://github.com/AzureAD/microsoft-authentication-library-for-go . I preferred Go (CGo) since I end up with a single .so/,dll and no other env setup which would be needed for (python/C#) MSAL packages. – Rags Jan 06 '21 at 15:32
  • @Rags How did you use it ? Any go sample would be really appreciated. I used another go lib named adal and the AD token was bad – Erwan Douaille Jan 20 '21 at 14:29
  • 1
    This is two years old. Any news on that? – Uri London May 03 '22 at 17:40
  • I'm no longer the current contact for this. Looks like they didn't officially open source that library yet, so I presume my statement is still accurate. – amit May 04 '22 at 19:04
-1

There actually is a C++ ADAL SDK, Microsoft releases it to partners and uses it internally. It is not generally available, but if your company has a liaison with Microsoft, you can ask for it.

SashaZh
  • 122
  • 4
  • 2
    I'm the Lead Program Manager for ADAL/MSAL. This statement is inaccurate. The ADAL C++ library is limited in scope and in the final stages of retirement. It is not made available to any Microsoft partners. We have started work on an MSAL C++ library, but it will not be available until calendar year 2022. https://techcommunity.microsoft.com/t5/azure-active-directory-identity/update-your-applications-to-use-microsoft-authentication-library/ba-p/1257363 – Saeed Akhter Mar 27 '21 at 16:57
  • 2
    There's nothing in your statement that contradicts my statement or makes it inaccurate except the notion that Microsoft does not share it with partners. Well, I worked for a company that is MS's partner, and we got the ADAL C++ library from MS. So what is inaccurate in my statement? I never said it is not limited in scope (though we were able to do everything we needed with it), I never said anything about retirement (also, Microsoft's final stages of retirement can easily mean 10 more years, and I can give you examples). – SashaZh Mar 28 '21 at 17:37
  • 1
    @SaeedAkhter Do you have any updates regarding MSAL C++ library now? As it's almost end of 2022 I am hoping some tangible progress would have been made by now. – abhi Dec 05 '22 at 09:03