How can I add a PublisherId to a GetBlob call to t

2020-04-22 01:58发布

I'm attempting to iteratively retrieve the content from the O365 management API (found here). When I get to the 'Retrieving Content' section, I am making a get request using the URI returned from the 'Get Available Content' method.

I am able to successfully iterate over the available content using the returned URI, but I am seeing the following message appear occasionally:

{"error": {"message": "Too many requests. Method=GetBlob, PublisherId=00000000-0000-0000-0000-000000000000", "code": "AF429"}}

This indicates a throttling error, as mentioned at the bottom of the documentation, but when I try to add the '&PublisherId={myid}' to that request, I get a Runtime Error returned from the server.

Does anyone know how to add the PublisherId to the GetBlob call so that I can avoid throttling?

2条回答
家丑人穷心不美
2楼-- · 2020-04-22 02:15

I had the same issue and then added the "?PublisherIdentifier={id}" uri parameter like Julian mentioned. That fixed the issue for me.

You can see the setup that I've been using at the below link (Python). It uses asyncio/aiohttp to speed up the log gathering and also performs the pagination in case you have a 'NextPageUri' header in the response.

https://github.com/IntegralDefense/o365_log_fetch

Documentation isn't up to speed yet, but hopefully that will change soon.

查看更多
戒情不戒烟
3楼-- · 2020-04-22 02:26

I had the same issue and added "?PublisherIdentifier={id}" to the url and it seems to be working now.

On another topic, be aware that if you use the list available content method the pagination header is 'NextPageUri' and not 'NextPageUrl' like the documentation says.

查看更多
登录 后发表回答