@Eric Franckx Thanks for posting your question in Microsoft Q&A, apologize for any inconvenience caused on this.
The parameter -Scope
is required for New-AzApiManagementSubscription which is called out in the documentation as shown below.
As you are trying to create a new subscription and add the particular user and product to it. I would suggest you try modifying your cmdlet to below.
$apimContext = New-AzApiManagementContext -ResourceGroupName "{ResourceGroupName}" -ServiceName "{APIM INstanceName}"
New-AzApiManagementSubscription -Context $apimContext -name "{NameOfSubscription}" -Scope "/products/{ProductName}" -UserId "{UserId}"
or based on your requirement.
Hope this helps, let me know if you have any further questions.