# Filebeat - o365 module Error, api error:AF20051

**URL:** https://discuss.elastic.co/t/filebeat-o365-module-error-api-error-af20051/238148
**Category:** Beats
**Tags:** filebeat
**Created:** [June 22, 2020, 8:08pm UTC](https://discuss.elastic.co/t/filebeat-o365-module-error-api-error-af20051/238148 "2020-06-22T20:08:51Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![zerolife](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zerolife/32/70846_2.png) [@zerolife](https://discuss.elastic.co/u/zerolife)
#### Post date: [June 22, 2020, 8:08pm UTC](https://discuss.elastic.co/t/filebeat-o365-module-error-api-error-af20051/238148/1 "2020-06-22T20:08:51Z")

</div>

Hi, I was hoping someone can help point me in the right direction here.  
I setup Filebeat and the o365 module. Everything was working fine for 8 days or so. And then for some reason, it stopped being able to connect to the Office 365 API.

I see this in the logs:

```auto
Jun 22 19:52:12 ip-10-1-2-112 filebeat[14356]: 2020-06-22T19:52:12.757Z WARN [o365audit] o365audit/contentblob.go:93 Got error 400 Bad Request: api error:AF20051 Content requested with the key 202.........615
Jun 22 19:52:23 ip-10-1-2-112 filebeat[14356]: 2020-06-22T19:52:23.688Z WARN [o365audit] o365audit/contentblob.go:93 Got error 400 Bad Request: api error:AF20051 Content requested with the key 202.........615

```

According to Microsoft, ([https://docs.microsoft.com/en-us/office/office-365-management-api/office-365-management-activity-api-reference](https://docs.microsoft.com/en-us/office/office-365-management-api/office-365-management-activity-api-reference)) the Error code AF20051

AF20051: Content requested with the key {0} has already expired. Content older than 7 days cannot be retrieved.

I tried a full uninstall|purge / re-install of filebeat and I still get the same error.

I modified the o365 module config file and uncommented the max\_retention: 168h  
and that didn't help either.

Has anyone come across this issue? I know the module is still in beta, but I figured I would ask...

System details:  
OS: Debian 9  
Filebeat version: 7.8  
Elastic cloud version: 7.7.1

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 20, 2020, 10:08pm UTC](https://discuss.elastic.co/t/filebeat-o365-module-error-api-error-af20051/238148/2 "2020-07-20T22:08:54Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
