2
votes

Does anyone have experience with Microsoft's Azure Active Directory authentication in Rust? I've built a service at work that has LDAP authentication support, but we now need to deploy said application at a client that doesn't use LDAP. They've advised us to look at Active Directory Federated Services and Azure Active Directory.

I've been researching, and it seems like Microsoft mainly provides an Active Directory Authentication Library (ADAL) for popular languages/frameworks, with no barebones documentation that I can find.

Does anyone know a resource/online documentation that I could follow? I'm looking for some generic REST API that I could implement with request or hyper.

1
Please note that "asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it." (SO/help/on-topic). You could ask your question in the user-forum instead.hellow
I think there is no official library at least. But AAD supports OpenID Connect, it's used in most new apps. There might be a library for OpenID Connect authentication for Rust? You can find general protocol documentation here: docs.microsoft.com/en-us/azure/active-directory/develop/…juunas

1 Answers

1
votes

Actually sure, you can refer to the offical document Azure REST API Reference to know how to register a client application with Azure AD and to authenticate for calling a REST API in Rust with request or hyper. I think it's your real want.

Otherwise, Python is a good embedded scripting language for Rust. Uf you can use ADAL for Python to get access token via authentication, I think a good workaround is to use some cargo modules like PyO3/pyo3 or dgrunwald/rust-cpython to call a Python script for authenticating with AAD from Rust code.