microsoft / powercat-business-approvals-kit

MIT License
34 stars 3 forks source link

[Business Approvals Kit - BUG] Approvals Kit Connector Get 401 Error #281

Closed Aaron-du closed 1 month ago

Aaron-du commented 1 month ago

Describe the issue

When i following setup step 10(Under the Test tab,test the GetPublishedWorkflow operation), the Approval Kit custom connector provided a 401 unathorized error 微信截图_20240717121131

Expected Behavior

when test the GetPublishedWorkflow operation ,the operation can run successfully with status as 200.

What solution version are you using?

1.0.20240618.1

What app or flow are you having the issue with?

Custom Connector

Steps To Reproduce

  1. Update the Approvals kit with a custom connector(host, client-id, client-secret, tenent-id, resource url)
  2. Copy Redirect URL
  3. Open the created Entra App Registration
  4. Select Authentication.
  5. In the Web Redirect URIs, add the Redirect URL.
  6. Select Save to update the App Registration.
  7. Switch back to the custom connector.
  8. Select Update connector.
  9. Open the Approval Kit custom connector, Select the Test tab
  10. Ensure that have a connection, Select the GetPublishedWorkflows operation, Select the Test Operation
  11. An error result of 401 is returned

Anything else?

When i update approvals kit with a custom connector in security tab, Oauth 2.0 is ok, but i not sure that Authentication is AAD.So i keep it as default, no modifications

GetPublishedWorkflows Error Message: { "401_error_reason": "Authorization header is missing.", "allow": "OPTIONS,GET,HEAD,POST", "authactivityid": "c6d9c72e-397c-45a2-8c79-1a79449fd2a7", "content-length": "0", "crm.serviceid": "CRMAppPool", "date": "Wed, 17 Jul 2024 02:20:07 GMT", "nativewebsession-version": "2", "public": "OPTIONS,GET,HEAD,POST", "req_id": "41456958-da28-4c09-9d67-c77f2b77bd3a", "strict-transport-security": "max-age=31536000; includeSubDomains", "www-authenticate": "Bearer authorization_uri=https://login.microsoftonline.com/ab87310b-d425-43bc-a549-9478cc65235a/oauth2/authorize, resource_id=https://org52db5327.crm5.dynamics.com/", "x-ms-apihub-cached-response": "true", "x-ms-apihub-obo": "false", "x-ms-service-request-id": "41456958-da28-4c09-9d67-c77f2b77bd3a", "x-source": "159165405672191514054165721522119926123711301499522511420518410208136249128596138,1511772501692483924995992092615993160126224222141171371842622223115711321321024017213032" }