Share via

Input fields disabled in teams App while debugging locally and invalid client Id error in console

Godhwani, Naina 41 Reputation points
2022-08-11T16:42:58.677+00:00

Hi,

I am working on teams app with create tab functionality. While debugging and running the app locally, the app is loading but I am unable to interact with any of the user editable fields like input box, dropdown etc.

On inspecting I can see an error that the clientId is invalid when Graph api trying to login and get content. Below is the error

Uncaught ErrorWithCode.InvalidConfiguration: clientId in configuration is invalid: undefined. at TeamsUserCredential.loadAndValidateConfig (https://localhost:53000/static/js/vendors~main.chunk.js:113083:11)

We have clientId mentioned in the .fx/states/state.dev.json file under

"fx-resource-aad-app-for-teams": {
"clientId": "XXXX",

It tries to get data from Graph API using below code.

credentials = new TeamsUserCredential();
if (!_graph) _graph = createMicrosoftGraphClient(credentials, SCOPE);
return _graph.api(url);

ClientId that we have provided is a valid one and has not reached its expiry yet.
Even we created new key but issue is same.

Note : Fields are editable when I launch the app using Remote option.
Any ideas on how can I resolve this?

Microsoft Teams | Development
Microsoft Teams | Development

Building, integrating, or customizing apps and workflows within Microsoft Teams using developer tools and APIs

Microsoft Security | Microsoft Graph
Microsoft Teams | Microsoft Teams for business | Other

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.