bicep for fin&Ops apps (dynamicsax connection) grantType: client_credentials - Stack Overflow

admin2025-04-26  6

I have created a connection from logic app ui to connect to an instance(Dynamics ERP) to 'list items present in table' I have selected authentication via service principal and provided the appid, appsecret etc. on looking at the json view of the connection i can see below under properties

"parameterValues": { "token:clientId": "8543874-dummyvalue" "token:TenantId": "87435-afd" "token:grantType": "client_credentials"}

Please help with the bicep for this connection

I have created a connection from logic app ui to connect to an instance(Dynamics ERP) to 'list items present in table' I have selected authentication via service principal and provided the appid, appsecret etc. on looking at the json view of the connection i can see below under properties

"parameterValues": { "token:clientId": "8543874-dummyvalue" "token:TenantId": "87435-afd" "token:grantType": "client_credentials"}

Please help with the bicep for this connection

Share Improve this question edited Jan 13 at 22:34 Daniel Mann 59.2k13 gold badges105 silver badges127 bronze badges asked Jan 13 at 16:18 pikupiku 6134 gold badges14 silver badges45 bronze badges 4
  • HI, what is the error ? when you try to create the connection from bicep it doesnt work? – Thomas Commented Jan 13 at 17:30
  • Also could you share your bicep file ? – Thomas Commented Jan 13 at 18:15
  • 1 hi thomas thnks for your response, the issue is resolved as i have reponded below – piku Commented Jan 13 at 21:11
  • Glad it worked for you :-) – Thomas Commented Jan 14 at 0:14
Add a comment  | 

2 Answers 2

Reset to default 0

this link has resolved my issue. I have replaced with the below

  parameterValues: {
  'token:clientId': ClientId
  'token:clientSecret': ClientSecret
  'token:TenantId': subscription().tenantId
  'token:grantType': client_credentials
  }

In fact, there should be a default value here, resourceUri. The logic here is consistent with the logic of obtaining access token. There seem to be some rules to follow for different resources or scopes (defined by resourceUri), such as azure resource or microsoft graph related.

azure resource related connection, such as Arm, etc.

    parameterValues: {
      'token:clientId': 'xxxx'
      'token:clientSecret': 'xxx'
      'token:TenantId': 'xxxx'
      'token:grantType': 'client_credentials'
      'token:resourceUri': 'https://management.core.windows.net/'
    }
    

Microsoft graph related

    parameterValues: {
      'token:clientId': 'xxxx'
      'token:clientSecret': 'xxx'
      'token:TenantId': 'xxxx'
      'token:grantType': 'client_credentials'
      'token:resourceUri': 'https://graph.microsoft.com/'
    }

Just for discussion.

转载请注明原文地址:http://anycun.com/QandA/1745637937a91053.html