简体   繁体   English

Azure Active Directory Graph 与 Microsoft Graph

[英]Azure Active Directory Graph vs Microsoft Graph

Can Anyone tell the difference between Azure Active Directory Graph vs Microsoft Graph.谁能说出 Azure Active Directory Graph 与 Microsoft Graph 之间的区别。

What is the use of the these API and appropriate scenario to choose these API这些API有什么用,选择这些API的合适场景

Also What is the best approach to call the Graph API (directly from angular application or From Web API)?另外调用 Graph API 的最佳方法是什么(直接从 angular 应用程序或来自 Web API)?

You can refer to this tutorial which about the difference between AAD Graph and Microsoft Graph.关于 AAD Graph 和 Microsoft Graph 之间的区别,您可以参考本教程

Currently, we'd rather you use Microsoft Graph but not AAD Graph because some features are migrating from AAD Graph to Microsoft Graph.目前,我们希望您使用 Microsoft Graph 而不是 AAD Graph,因为某些功能正在从 AAD Graph 迁移到 Microsoft Graph。 But in some case, we can just implement the requirements by AAD Graph.但在某些情况下,我们可以通过 AAD Graph 实现需求。

And in my opinion, we can just call the Graph API directly from angular application easily.在我看来,我们可以直接从 Angular 应用程序中轻松调用 Graph API。

Can Anyone tell the difference between Azure Active Directory Graph vs Microsoft Graph.谁能说出 Azure Active Directory Graph 与 Microsoft Graph 之间的区别。

AAD Graph API is an older API that gives access to only directory data. AAD Graph API 是一个较旧的 API,它只允许访问目录数据。 You should prefer MS Graph API wherever possible.您应该尽可能选择 MS Graph API。 MS Graph API combines many APIs into one, including those in AAD Graph API. MS Graph API 将许多 API 合二为一,包括 AAD Graph API 中的 API。

What is the use of the these API and appropriate scenario to choose these API这些API有什么用,选择这些API的合适场景

Always choose MS Graph API if it works in your case and provides the data you need.如果 MS Graph API 适用于您的情况并提供您需要的数据,请始终选择它。 For example with Azure AD B2C you cannot really use MS Graph API.例如,对于 Azure AD B2C,您不能真正使用 MS Graph API。 There may also be some smaller things missing from MS Graph API that exist in AAD Graph API. AAD Graph API 中存在的 MS Graph API 中也可能缺少一些较小的东西。

Also What is the best approach to call the Graph API (directly from angular application or From Web API)?另外调用 Graph API 的最佳方法是什么(直接从 angular 应用程序或来自 Web API)?

Use Implicit Grant flow with MSAL.js from your front-end.从前端将隐式授权流与 MSAL.js 结合使用。 Your front-end app needs to be registered in AAD and require delegated permissions to the API so it can call the API on behalf of the signed in user.您的前端应用程序需要在 AAD 中注册,并且需要为 API 委派权限,以便它可以代表登录用户调用 API。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM