使用 PHP 从 MS Dynamics CRM Web API 获取联系人
Fetch contact from MS Dynamics CRM Web API with PHP
我正在使用 jamesmcq 的库 (https://github.com/jamesmcq/oidc-aad-php-library) 与 PHP 连接并从 Microsoft Dynamics CRM Online 获取联系人数据。我已经通过 OAuth 成功登录并获得了令牌,但是当我尝试使用 access_token 访问 CRM Web API 时,出现以下异常:
AADSTS65001: The user or administrator has not consented to use the application with ID 'XXXXXX-XXXXXX-XXXX-XXX-XXXXXXX'. Send an interactive authorization request for this user and resource.
我已经找到了这个答案:,但我只能访问新的 Azure 门户,不能访问经典门户,所以我不知道在哪里可以找到那个人所说的设置。另外,我在Azure Active Directory菜单下发现了类似的东西,我授予了所有权限,但异常仍然存在。
谁能帮我解决这个错误?
更新:
这是我对应用程序权限的设置:
在新的 Azure 门户中,您可以按照以下步骤访问该屏幕:
- Azure 活动目录
- 应用注册
- Select 你的申请
- 所需权限
从那里,您可以添加新权限:
更新:
我正在使用 jamesmcq 的库 (https://github.com/jamesmcq/oidc-aad-php-library) 与 PHP 连接并从 Microsoft Dynamics CRM Online 获取联系人数据。我已经通过 OAuth 成功登录并获得了令牌,但是当我尝试使用 access_token 访问 CRM Web API 时,出现以下异常:
AADSTS65001: The user or administrator has not consented to use the application with ID 'XXXXXX-XXXXXX-XXXX-XXX-XXXXXXX'. Send an interactive authorization request for this user and resource.
我已经找到了这个答案:
谁能帮我解决这个错误?
更新:
这是我对应用程序权限的设置:
在新的 Azure 门户中,您可以按照以下步骤访问该屏幕:
- Azure 活动目录
- 应用注册
- Select 你的申请
- 所需权限
从那里,您可以添加新权限:
更新: