Schedule Microsoft Entra ID Asset Import
Asked by Monty:

Goal: {#toc-hId--383043439}
---------------------------

**I want to be able to schedule this import.**

My approach is to trigger the Import Start via the API (but if there is another way, then please let me know.)

#### References: {#toc-hId--1489433324}

* [Post Import Start API Documentation](https://developer.atlassian.com/cloud/assets/rest/api-group-import/#api-group-import)

* [Microsoft Entra ID Integration Documentation](https://support.atlassian.com/jira-service-management-cloud/docs/what-is-the-assets-microsoft-entra-id-integration/)

* [Atlassian App - JSM Assets - Microsoft Entra ID (Azure AD) Integration](https://marketplace.atlassian.com/apps/1232506/jsm-assets-microsoft-entra-id-azure-ad-integration?hosting=cloud&tab=overview)

* [How to schedule Assets import using Automation for Assets](https://confluence.atlassian.com/jirakb/how-to-schedule-assets-import-using-automation-for-assets-1155466867.html)

I've got my workspace ID, I've got the importSource ID.

I send a POST request according to the documentation and it fails with a (415) Unsupported Media Type error. No biggie, just set the content-type as well. When I set both the Accept and Content-Type, then I get a (400) Bad Request error.

I've tried the steps outlined in [How to schedule Assets import using Automation for Assets](https://confluence.atlassian.com/jirakb/how-to-schedule-assets-import-using-automation-for-assets-1155466867.html) and the error is a little more revealing:  

```
Error publishing web request. Response HTTP status: 400
Error response HTTP body:
{"errorMessages":["Cannot start import if run externally"],"errors":{}}
```


Answers:
author: Hakan Bahadir _Pio_
body: Hello,

There are 2 different import types for JSM Assets. One of them is out of the box import type which means CSV and JSON. The second one is external import. Atlassian's application and other marketplace applications (including [ours](https://marketplace.atlassian.com/vendors/1223473)) use this import type. The API is designed by Atlassian so that the the import logic (object type/attribute creation, mapping, and scheduling) is in the control of the application.

In summary, at the moment, you won't be able to trigger an import via the API.

FYI

Hakan Bahadir

Pio

comments: author: Monty
body: Well, that's frustrating. I figured that was the reason. I wish it were possible to just expose the extension's trigger to the Assets API (or have built-in scheduling).


author: Monty
body: I convinced my organization to buy Premium licensing to get the Asset Management functionality and now I have to tell them that in order to use it I'll need them to purchase another thing. I get that you built an app that does essentially the same thing, with the scheduling feature, and I'm not saying you shouldn't get paid for that work, but honestly, I'd rather Atlassian just buy your products outright and just include it in with Premium.

These seem like essential features that should just come with Asset Manager.


author: Cristian Iorio
body: I have the same problem, extremely frustrating!


author: ?????? ???????
body: Are we gonna have this feature in near feature? Very important

comments: author: Monty
body: I would hope so, but I sincerely doubt it. It's difficult to tell where they are focusing their efforts, but I haven't seen any evidence that this is on any roadmap.


Tags: cloud

jira-service-management

jira-service-management-cloud