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中遇到的错误:
有人可以指导我我在做什么问题?我在集成及其MT第一集成项目中相对较新。
要使用Power BI中的NetSuite REST API进行身份验证,您需要复制您在Postman中成功实现的OAUTH 1.0身份验证过程。但是,M查询没有内置的OAuth 1.0支持,因此您需要手动生成Oauth标题。 to在M QUERY中对NetSuite REST API进行身份验证:
1。 为OAuth 1.0标头加成
由于电源查询不提供内置的OAuth 1.0支持,您需要使用外部工具(例如Python,Power Automate或自定义电源查询功能)进行重新计算。计算的
Authorization
标头必须包含在每个请求中。
2。一旦您拥有预先计算的标头,就可以构建电源查询代码以包括身份验证。
Authorization
如何生成OAuth 1.0标头由于M Query无法动态生成OAuth签名,因此您必须生成the the the the the the the the the the the before。提出请求。这是一些方法:
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
Authorization
标头。
Authorization
使用自定义电源查询功能
结论
在外部生成oauth标头,然后将其粘贴到电源查询中。