【问题标题】:Dynamics 365 - Field Service : The scope 'Odata.FullAccess' does not existDynamics 365 - Field Service:范围“Odata.FullAccess”不存在
【发布时间】:2020-08-20 12:32:36
【问题描述】:

案例:通过 Common Data Services OData 在 Dynamics 365-Field Service 中的 CRUD 工作订单

  1. 我正在尝试访问 Dynamics 365 Field Service 的字段。

我使用 PythonFlask 来构建 webapp

  1. 我需要 CRUD 工单:https://docs.microsoft.com/en-us/dynamics365/customer-engagement/web-api/msdyn_workorder?view=dynamics-ce-odata-9

  2. 我正在使用多租户服务器到服务器的身份验证机制:https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/use-multi-tenant-server-server-authentication

  3. 我已在 Azure 上设置应用注册:https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app

  4. 我已经配置了几个权限:

  • Odata.FullAccess
  • AX.FullAccess
  • CustomService.FullAccess
  • User.Read
  • User.ReadBasic.All

  1. 我使用 Microsoft 提供的代码模板来构建与 Active Directory 和 Dynamics 365 交互的 Web 应用程序

    https://docs.microsoft.com/en-us/azure/active-directory/develop/scenario-web-app-call-api-overview

错误信息

Login Failure

invalid_scope
    The provided value for the input parameter 'scope' is not valid. 
    The scope 'Odata.FullAccess User.ReadBasic.All offline_access openid profile' 
    does not exist.

你有什么想法吗?

非常感谢您在此问题上投入的时间

【问题讨论】:

  • 你如何发送范围?它是 URL 编码的吗?例如scope=user.read%20mail.read

标签: python-3.x azure flask azure-active-directory microsoft-dynamics


【解决方案1】:

基于Grant your application rights to access Common Data Service data,您需要选择以组织用户身份访问 Dynamics 365

它在 Dynamics CRM 而不是 Dynamics ERP 下。

Odata.FullAccess 是 Dynamics ERP 下的权限,对您的场景无效。

【讨论】:

  • @allan-wu,我以不同的方式解决了这个问题。我删除了所有范围并且身份验证机制起作用。我会尝试你的解决方案。非常感谢
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2020-03-19
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-06-28
  • 1970-01-01
相关资源
最近更新 更多