> For the complete documentation index, see [llms.txt](https://docs.smsagent.blog/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.smsagent.blog/microsoft-endpoint-manager-reporting/gathering-custom-inventory-with-intune/set-up-the-azure-resources.md).

# Set up the Azure Resources

If you haven't already done so, you'll need to create and/or configure some Azure resources to enable you to automate exports from Microsoft Graph. You'll need to set up the following resources and this is documented elsewhere in this site. You can, of course, use existing resources you have in Azure - you just need to make sure they are configured for use with this solution, such as enabling a managed identity on the automation account, granting Graph API permissions to it and creating a custom role for the Azure storage account.

## Azure automation account

The automation account is used to execute runbooks on a schedule. These runbooks will export data from Microsoft Graph and save them to Azure storage and/or send them to a Log Analytics workspace.

For the Azure automation runbook, you don't need to create a runbook at this stage but you will need to import the required PowerShell modules into the automation account.

{% content-ref url="/pages/-MhPv1XVi754Ozf78Jtx" %}
[Create / configure an Azure automation account](/microsoft-endpoint-manager-reporting/automating-data-exports-from-microsoft-graph/azure-automation-account/create-configure-an-azure-automation-account.md)
{% endcontent-ref %}

{% content-ref url="/pages/-MhPvnhW1AGZDuZGrlKZ" %}
[Grant API permissions](/microsoft-endpoint-manager-reporting/automating-data-exports-from-microsoft-graph/azure-automation-account/grant-api-permissions.md)
{% endcontent-ref %}

{% content-ref url="/pages/-MhPx9jqExbhbeFncHt2" %}
[Create an Azure automation runbook](/microsoft-endpoint-manager-reporting/automating-data-exports-from-microsoft-graph/azure-automation-account/create-an-azure-automation-runbook.md)
{% endcontent-ref %}

## Azure storage account

If you want to export data from Microsoft Graph to an Azure storage account, reference the following guide.

{% content-ref url="/pages/-Mi25918CCwoBsjrzRr5" %}
[Azure Storage account](/microsoft-endpoint-manager-reporting/automating-data-exports-from-microsoft-graph/azure-storage-account.md)
{% endcontent-ref %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.smsagent.blog/microsoft-endpoint-manager-reporting/gathering-custom-inventory-with-intune/set-up-the-azure-resources.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
