简体   繁体   English

Android 管理 API - 调用者无权管理企业

[英]Android Management API - Caller is not authorized to manage enterprise

Good morning, I am setting up my server with Android Management API, but I am having some problems.早上好,我正在使用 Android 管理 API 设置我的服务器,但我遇到了一些问题。

I followed all quickstart guide to link: https://developers.google.com/android/management/quickstart我按照所有快速入门指南链接: https://developers.google.com/android/management/quickstart

I am able to get the oauth token and JWT but I am not able to get my basic policy because I get the error on https://androidmanagement.googleapis.com/v1/enterprises/{MY_ENTERPRAISE_ID}/policies/{MY_POLICY} : I am able to get the oauth token and JWT but I am not able to get my basic policy because I get the error on https://androidmanagement.googleapis.com/v1/enterprises/{MY_ENTERPRAISE_ID}/policies/{MY_POLICY} :

error: {code: 403, message: "Caller is not authorized to manage enterprise.", status: "PERMISSION_DENIED"}

code: 403 message: "Caller is not authorized to manage enterprise."代码:403 消息:“来电者无权管理企业。” status: "PERMISSION_DENIED"状态:“PERMISSION_DENIED”

How can I solve this issue?我该如何解决这个问题?

To call the API from a server, you need to enable the Android Management API for your project and create a service account.要从服务器调用 API,您需要为您的项目启用 Android 管理 API 并创建服务帐户。 To access the Android Management API your service account requires the androidmanagement.enterprises.manage permission, which can be granted by the roles/androidmanagement.user role.要访问 Android 管理 API,您的服务帐户需要 androidmanagement.enterprises.manage 权限,该权限可以由角色/androidmanagement.user 角色授予。 Kindly refer to this to know more about creating a service account .请参阅此内容以了解有关创建服务帐户的更多信息。

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

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