Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Requests by the API to msgraph fail due to "invalid client" #2463

Closed
marrobi opened this issue Aug 15, 2022 · 4 comments
Closed

Requests by the API to msgraph fail due to "invalid client" #2463

marrobi opened this issue Aug 15, 2022 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@marrobi
Copy link
Member

marrobi commented Aug 15, 2022

The App Registration secret/password (?) used by App Service is invalid. This seems to happens after running make auth.

  1. We should clarify the difference between App Registration Client Secret and Password - docs?
  2. Work out a way forward so that if make auth is the culprit it doesn't immediately cause the API graph calls to stop functioning.
@marrobi marrobi added the bug Something isn't working label Aug 15, 2022
@marrobi marrobi assigned marrobi and tanya-borisova and unassigned marrobi Aug 15, 2022
@ross-p-smith
Copy link
Contributor

When make auth creates the API App Registration, it also creates a Service Principal and resets the password each time if the Service Principal already exists. If you do not run make deploy-core afterwards then the password that is in the keyvault will then be out-of-date. Which will result in an "Invalid Client" error.

@marrobi
Copy link
Member Author

marrobi commented Aug 15, 2022

We are seeing instances where even after running make deploy-core the issue persists.

The manual work around is to add a client secret to the app registration, add that to the keyvault secret, and update the version in the api app KeyVault reference.

I've fixed manually, run deploy-core again and it breaks.

@tanya-borisova tanya-borisova removed their assignment Aug 15, 2022
@marrobi
Copy link
Member Author

marrobi commented Aug 15, 2022

Ok, it seems on the first run of deploy core the secret is updated in keyvault, but the API app is not updated. The second run the api secret is updated.

I tried a dependency on terraform, in the api app onto the KV client secret, but that didn't work.

@marrobi marrobi added this to the Release 0.5 milestone Aug 17, 2022
@kolesnykandrii
Copy link
Contributor

Although auth.env was updated after running make deploy-core twice, the keyvault still had the old secret, and had to manually update the keyvault and then the app keyvault reference.

@stuartleeks stuartleeks removed their assignment Sep 20, 2022
@tanya-borisova tanya-borisova removed their assignment Nov 10, 2022
@marrobi marrobi removed this from the Release 0.5 milestone Jun 27, 2023
@marrobi marrobi self-assigned this Oct 24, 2024
@marrobi marrobi closed this as completed Nov 6, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants