As part of report migration project from other technologies to PowerBi.
i am using Fabric Rest APIs (https://learn.microsoft.com/en-us/rest/api/fabric/semanticmodel/items/create-semantic-model)
to create semantic layer in directQuery Mode.
And i am using below "model.bim" JSON configuration for connecting with database
but here i don't see any option to provide database username and password
so when i open this dataset from power bi service it gives popup like "The datasource is missing credentials and cannot be accessed"
now my requirement is somehow i need to pass database username and password along with model.bim JSON
so semantic layer will already get connected with database and we can create visual report directly
"partitions": [{
"name": "Applications",
"mode": "directQuery",
"source": {
"type": "m",
"expression": [
"let",
" Source = Sql.Database(\"xxx-xxxx..database.windows.net\", \"database_name\"),",
" dbo_Applications = Source{[Schema=\"dbo\",Item=\"country\"]}[Data]",
"in",
" dbo_Applications"
]
}
}
]