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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
xli629b
Helper II
Helper II

Gateways - Update Datasource request fails: Invalid Ciphertext size.

When I make a request to update datasource for a gateway, I get an error about ciphertext that seems rather confusing since I'm just using Basic credentials. Any idea what this means?

PATCH https://api.powerbi.com/v1.0/myorg/gateways/(my-gateway-id)/datasources/(my-data-set-id)

 

 

 

{
  "credentialDetails": {
    "credentialType": "Basic",
    "credentials": "{\"credentialData\":[{\"name\":\"username\", \"value\":\"my_username\"},{\"name\":\"password\", \"value\":\"my_password\"}]}",
    "encryptedConnection": "NotEncrypted",
    "encryptionAlgorithm": "None",
    "privacyLevel": "None"
  }
}

 

 

 

 

{
  "error": {
    "code": "DM_GWPipeline_UnknownError",
    "pbi.error": {
      "code": "DM_GWPipeline_UnknownError",
      "parameters": {},
      "details": [
        {
          "code": "DM_ErrorDetailNameCode_UnderlyingErrorMessage",
          "detail": {
            "type": 1,
            "value": "Invalid Ciphertext size. Expecting cipher text of atleast length, 344. Provided cipherText length, 93"
          }
        },
        {
          "code": "DM_ErrorDetailNameCode_UnderlyingHResult",
          "detail": {
            "type": 1,
            "value": "-2146233296"
          }
        }
      ],
      "exceptionCulprit": 1
    }
  }
}

 

3 REPLIES 3
afernand0
Frequent Visitor

I'm getting the same error when trying to update basic credentials. Much appreciated if anyone can shed some light on to what's causing this error. Thanks.

Icey
Community Support
Community Support

Hi @xli629b ,

 

Is this problem solved?


If it is solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.


If not, please let me know.

 


Best Regards
Icey

Icey
Community Support
Community Support

Hi @xli629b ,

 

I suggest you to refer to this post first to create a database without database name by using RESTful API: https://community.powerbi.com/t5/Power-Query/Gateway-advises-Sql-Database-function-is-unsupported/m-....

 

Then, try this:

update.png

 

 

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.