Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I'm trying to create an IoTHub connection using the MS Fabric API.
Based on the sample in the documentation, I create my json body:
I'm not able to fin the parameter name expected for an IoTHub connection.
When I create this type of connection in MS Fabric, I assume it's waiting only 1 parameter.
I have tried multiple parameter name (iothub, azureiothub, name, ...) but I keep geting the same error:
Error response: {"requestId":"2b70a182-9448-439b-b732-f9338bb229a3","errorCode":"InvalidInput","moreDetails":[{"errorCode":"InvalidParameter","message":"Error reading JObject from JsonReader. Current JsonReader item is not an object: String. Path 'connection
Details.parameters[0]', line 18, position 79."}],"message":"The request has an invalid input"}
Here is my powershell object used to construct the body
Can you help me find this parameter name please?
Many thanks!
Regards,
Yohann
Solved! Go to Solution.
Hi,
I found an API endpoint in the documentaion to list the supported connection types.
And with the "try it" option, you can retreive the needed information:
So the connections details for an IoTHub should have "IoTHub.Contents" as creation methods and "entutyPath" as parameter. Here is my body the is actually working. Which is akward because it's not matching exactly, I let you check the differences...
Hi,
I found an API endpoint in the documentaion to list the supported connection types.
And with the "try it" option, you can retreive the needed information:
So the connections details for an IoTHub should have "IoTHub.Contents" as creation methods and "entutyPath" as parameter. Here is my body the is actually working. Which is akward because it's not matching exactly, I let you check the differences...
Hi @burakkaragoz,
Can you provide a full JSON sample of your body?
It's seem that I don't use the correct "creationMethod" value.
Hi @yvaubourg ,
yeah, that part’s not super well documented tbh. there’s no single public list with all connection types + their expected parameter names (at least not yet).
what we do is:
it’s a bit hacky but works every time.
also, some connection types are documented here (but not all):
https://learn.microsoft.com/en-us/fabric/data-factory/connector-overview
Hi @yvaubourg ,
ran into the same issue when trying to create an IoTHub connection via API. The key thing is: the parameters array needs to contain objects, not plain strings.
Here’s a working example of the structure we used:
"connectionDetails": { "parameters": [ { "name": "connectionString", "value": "<your-iothub-connection-string>" } ] }
Make sure:
Also double-check the content type and headers in your request – sometimes the API is picky about that too.
Let me know if you want a full sample PowerShell or REST call.
If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I would be grateful for a 'Kudos' if you found my response helpful.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
29 | |
15 | |
6 | |
6 | |
3 |
User | Count |
---|---|
48 | |
43 | |
15 | |
7 | |
6 |