microsoft / coe-starter-kit

Other
739 stars 216 forks source link

[CoE Starter Kit - QUESTION] #8839

Closed steph-ong98 closed 1 week ago

steph-ong98 commented 3 weeks ago

Does this question already exist in our backlog?

What is your question?

For the Admin | Audit Logs | Office 365 Management API Subscription, we have been getting a BadRequest/ InvalidTemplate error due to the flow using the Client ID, however, we want to make it use the Azure Client Secret instead. How do we go abouts doing that? image

What solution are you experiencing the issue with?

Governance

What solution version are you using?

4.33

What app or flow are you having the issue with?

Admin | Audit Logs | Office 365 Management API Subscription

What method are you using to get inventory and telemetry?

Cloud flows

Jenefer-Monroe commented 3 weeks ago

It sounds like you did not set the env vars correctly. Let's get it working with hard coded secret before moving to the Azure Key Vault.

Open the last attempted run for Admin | Audit Logs | Office 365 Management API Subscription

Client ID

Is the app id correctly ingested here? It should be the Application ID of the app, not its Object ID. image image

Secret

Is the secret correctly ingested here? This should be a secret and not a GUID. This is a common mistake so please do take a look and let me know. image Does this call fail hence correctly marking the variable as false? image

steph-ong98 commented 2 weeks ago
  1. Under Set env var from AppID scope, we are getting the admin_aduitlogsclientid value from Environment Variable Definitions Dataverse Table, the value is 62fed...
  2. Then search this value in Environment Variable Values table, and since we are not capturing this value so we will have a null output
  3. Null output will fail the condition: Set to current or default - AppID, so will set the "theAppID" variable to the default client ID, which expired, the value is 3f683... because the default value of admin_CommandCenterApplicationClientID in Environment Variable Definitions Table is 3f683...
Jenefer-Monroe commented 2 weeks ago

Hello. I'm having a little trouble following your response here.

You reference the admin_CommandCenterApplicationClientID id, but that is not the correct env var to fill.

Please review here again and ensure all these env vars are filled. Update environment variables

Be sure to restart the flow after you set these to ensure the flow does not keep the cached value.

Jenefer-Monroe commented 1 week ago

closing out as no further action for starter kit team