Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Angel
Resolver III
Resolver III

Powershell - Create datasource using Basic Authentication

Hi, everyone

 

I'm struggling trying to create a datasource in a gateway. Credentials I'm going to use are basic.

 

I think the problem could be how I have created the body. This is the code.

 

 

 

$body =
     @{value =
       @{connectionDetails = @("http://localhost/DynamicsNAV110/OData/")
         datasourceName = @("URL Base ODATA")
         dataSourceType = @("OData")
         credentialDetails = @(
           @{credentialType = "Basic"
             credentials = '{\"credentialData\":[{\"name\":\"username\", \"value\":\"john\"},{\"name\":\"password\", \"value\":\"*****\"}]}'
             encryptedConnection = "Encrypted"
             encryptionAlgorithm = "None"
             privacyLevel = "None"
            }
         )
        }
      }

 

 

 

 

Can anyone help me with this, please???..

 

Thanks,

1 REPLY 1
vpartem
Frequent Visitor

I have the same error. Anyone?

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors