问题描述 投票:0回答:1
URL parts: https://****-sb1.suitetalk.api.netsuite.com/services/rest/record/v1/employee Authorization: OAuth realm="****_SB1",oauth_consumer_key="****",oauth_token="****",oauth_signature_method="HMAC-SHA256",oauth_timestamp="1740474598",oauth_nonce="**",oauth_version="1.0",oauth_signature="**" Content-Type: application/json

这是在PowerBi中遇到的错误:

enter image description here 有人可以指导我我在做什么问题?我在集成及其MT第一集成项目中相对较新。

要使用Power BI中的NetSuite REST API进行身份验证,您需要复制您在Postman中成功实现的OAUTH 1.0身份验证过程。但是,M查询没有内置的OAuth 1.0支持,因此您需要手动生成Oauth标题。 to在M QUERY中对NetSuite REST API进行身份验证:

1。 enter image description here为OAuth 1.0标头加成 由于电源查询不提供内置的OAuth 1.0支持,您需要使用外部工具(例如Python,Power Automate或自定义电源查询功能)进行重新计算。计算的

Authorization

标头必须包含在每个请求中。

2。
web-services powerbi netsuite integration netsuite-rest-api
1个回答
0
投票

一旦您拥有预先计算的标头,就可以构建电源查询代码以包括身份验证。

功率查询(M)实施

Authorization

如何生成OAuth 1.0标头
由于M Query无法动态生成OAuth签名,因此您必须生成the the the the the the the the the the the before。提出请求。这是一些方法:

使用Postman


postman自动生成标头。

复制生成的let // NetSuite API Endpoint url = "https://<account_id>.suitetalk.api.netsuite.com/services/rest/record/v1/salesOrder", // Precomputed OAuth 1.0 Header (Generated externally) authHeader = "OAuth realm=""****_SB1"",oauth_consumer_key=""****"",oauth_token=""****"",oauth_signature_method=""HMAC-SHA256"",oauth_timestamp=""1740474598"",oauth_nonce=""**"",oauth_version=""1.0"",oauth_signature=""**""", // Make the API Request response = Web.Contents(url, [ Headers = [ #"Authorization" = authHeader, #"Content-Type" = "application/json" ] ] ), // Parse the JSON Response jsonResponse = Json.Document(response) in jsonResponse 标头,然后将其粘贴到您的电源查询脚本中。

pusepython

如果您需要自动化,则可以使用Authorization

库在Python中生成

Authorization

标头。
Authorization

  1. 使用自定义电源查询功能

      如果您确实需要在电源查询内动态生成OAuth 1.0标头,则可能必须在M Query中手动签名(复杂)。
    • 结论
  2. Powery查询确实支持OAuth 1.0签名生成。
    • 在外部生成oauth标头,然后将其粘贴到电源查询中。
      
      	
最新问题
© www.soinside.com 2019 - 2025. All rights reserved.