Yes, but, unfortunately, this is not so smooth, and you do not get compile-time checking, which is one of the nice advantages of type providers.
You need to take it $metadatafrom your service and save it locally as a file .csdl, and then use the static parameter LocalSchemaFilein your code. You can then set the credentials for the data context object for authentication at runtime.
type Northwind = ODataService<"http://services.odata.org/Northwind/Northwind.svc/",
LocalSchemaFile="Metadata.csdl",
ForceUpdate=false>
let db = Northwind.GetDataContext()
db.Credentials <- System.Net.CredentialCache.DefaultCredentials
source
share