diff --git a/x-pack/plugins/ml/server/routes/indices.ts b/x-pack/plugins/ml/server/routes/indices.ts index ee817c492dbd4..8a5df1415bde8 100644 --- a/x-pack/plugins/ml/server/routes/indices.ts +++ b/x-pack/plugins/ml/server/routes/indices.ts @@ -40,7 +40,7 @@ export function indicesRoutes({ router, mlLicense }: RouteInitialization) { requestFields !== undefined && Array.isArray(requestFields) ? requestFields.join(',') : '*'; - const { body } = await client.asInternalUser.fieldCaps({ index, fields }); + const { body } = await client.asCurrentUser.fieldCaps({ index, fields }); return response.ok({ body }); } catch (e) { return response.customError(wrapError(e));