microsoftgraph / msgraph-sample-rubyrailsapp

This sample demonstrates how to use the Microsoft Graph REST API to access data in Office 365 from Ruby on Rails apps.
MIT License
91 stars 42 forks source link

Can you update this sample to reflect the retirement of Azure Active Directory? #181

Closed timdiggins closed 1 week ago

timdiggins commented 1 week ago

It would be amazingly helpful if you could update this sample to work with MSAL as ADAL (which this one relies on) has been deprecated for several years.

By updating the README and the code it would show the practical changes for updating from ADAL to MSAL (for both the setup of the MSAL endpoint and the specific code changes required).

jasonjoh commented 1 week ago

@timdiggins this sample doesn't use ADAL or MSAL - it uses omniauth-oauth2. There is no MSAL for Ruby.

MSAL Languages and Frameworks

timdiggins commented 1 week ago

@jasonjoh thanks for the quick response. Sorry I was using the wrong language - what I mean is can you update it to use the new Microsoft auth APIs and not the (as I understand it) deprecated Azure Active Directory -- the first step in the README in this sample is to set up a Azure Active Directory.

PS It's very hard to find anything that describes what has changed between Azure Active Directory and the new auth APIs/endpoints which doesn't reference libraries (like ADAL and MSAL).

(I understand OAuth, and Omniauth-oauth2, but I don't understand how to set up the backend for MS for oauth2 in the new non-AzAD world)

jasonjoh commented 1 week ago

No worries. This sample does work with the current Microsoft Entra ID endpoints. Azure AD was rebranded, and the README does need to be updated to reflect that, but the underlying tech is the same ;)

timdiggins commented 1 week ago

Oh - is it just a rebrand? It looks like there's still an Azure AD application that you can set up which is full of deprecation notices. Sorry going off topic for this repo I guess.

jasonjoh commented 1 week ago

There's a new portal where you can register your app, entra.microsoft.com. However, the auth itself is all using the same v2 endpoints: https://learn.microsoft.com/en-us/entra/identity-platform/v2-oauth2-auth-code-flow.

Where are you seeing deprecation notices?

timdiggins commented 1 week ago

Ohhh - it's from me totally misunderstanding the terminology.

There's a notice at the top of the Azuer AAD registered apps and I thought it was referring to these apps, meaning I had to re-register them somewhere else. 🤦

https://portal.azure.com/#view/Microsoft_AAD_RegisteredApps/ApplicationsListBlade App_registrations_-_Microsoft_Azure

Sorry again @jasonjoh, and thanks for clarifying.