diff --git a/api/@ohos.enterprise.adminManager.d.ts b/api/@ohos.enterprise.adminManager.d.ts index 3919e784a82d65389bd870a0275431bbdac2b563..89374a1fc177871867a4042aeeeecefe546e177d 100644 --- a/api/@ohos.enterprise.adminManager.d.ts +++ b/api/@ohos.enterprise.adminManager.d.ts @@ -804,6 +804,23 @@ declare namespace adminManager { * @since 18 */ function replaceSuperAdmin(oldAdmin: Want, newAdmin: Want, isKeepPolicy: boolean): void; + + /** + * Administrator delegates access to policies to another application. + * + * @permission ohos.permission.MANAGE_ENTERPRISE_DEVICE_ADMIN + * @param { string } bundleName - bundleName indicates the bundle name of the delegated application. + * @param { Array } policies - policies indicates the policies accessible to the delegated application. + * @param { number } userId - userId indicates the user ID. + * @throws { BusinessError } 9200009 - Failed to grant the permission to the application. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. + * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. + * @syscap SystemCapability.Customization.EnterpriseDeviceManager + * @systemapi + * @stagemodelonly + * @since 20 + */ + function setDelegatedPolicies(bundleName: string, policies: Array, userId: number): void; } export default adminManager;