If i assign a customer role like this: $"{serverBaseUrlOData}Customers({CustomerID})/CustomerRoles({CustomerRoleID})" then it seems that the Customer.CustomerRolles collection becomes nothing/ returns no collection items. If i create a new users and assign it a CustomerRole via de backend of the website than the Customer.CustomerRolles collection does returns collection items.
I get the Customers with this URL:
$top=99999&$expand=Orders,BillingAddress,BillingAddress/Country,ShippingAddress,CustomerRoles,Addresses
For example:
POST https://shop.com/odata/v1/Customers(1232)/CustomerRoles(7)
Response
{ "odata.metadata":"https://shop.com/odata/v1/$metadata#CustomerRoles/@Element","Name":"PayOnInvoice","FreeShipping":false,"TaxExempt":false,"TaxDisplayType":null,"Active":true,"IsSystemRole":false,"SystemName":null,"Id":7 }