ms-identity-java-webapi icon indicating copy to clipboard operation
ms-identity-java-webapi copied to clipboard

This sample should be using the Microsoft Graph SDK to demonstrate best practices

Open baywet opened this issue 4 years ago • 2 comments
trafficstars

Hi, Thanks for putting the sample together, OBO is a common request when people are trying to interact with Microsoft Graph.

I believe that this sample should be using (and demonstrating) the use of the SDK instead of crafting requests manually. This way customers would see the full, end to end scenario, and not just auth.

https://github.com/Azure-Samples/ms-identity-java-webapi/blob/65374b7497b7ecf3636467d1e1b379fc13fcc008/msal-obo-sample/src/main/java/com/microsoft/azure/msalobosample/ApiController.java#L41

baywet avatar Mar 08 '21 20:03 baywet

Hi Vincent, I agree with you fully. We are utilizing Graph SDK in our new chapter-wise samples, and so far, two of our new chapters implement Graph SDK features.

Please see Chapter 2.1 (call graph) in the chapter-wise MSAL Java tutorial where we demonstrate a web app getting /me data using Graph SDK. We also make use of Graph SDK in the Chapter 3.2 (Groups), where we receive group memberships using Graph SDK if there are too many to fit in an ID token.

Once I get a chance to work on the new OBO chapter in the upcoming weeks, we'll use Graph SDK to make the requests. I think this sample with manual Graph calls will be archived at that point.

idg-sam avatar Mar 16 '21 01:03 idg-sam

thanks for the insights! let's keep this issue open to track the progress for now.

baywet avatar Mar 16 '21 11:03 baywet