powerautomate-mcp 0.9.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -15319,6 +15319,7 @@ async function createDeviceCodeAuthProvider(config, silentOnly = false) {
|
|
|
15319
15319
|
};
|
|
15320
15320
|
const pca = new PublicClientApplication(msalConfig);
|
|
15321
15321
|
let currentAccount = null;
|
|
15322
|
+
let interactiveAuthCompleted = false;
|
|
15322
15323
|
const pendingTokenRequests = /* @__PURE__ */ new Map();
|
|
15323
15324
|
currentAccount = loadAccount();
|
|
15324
15325
|
if (!currentAccount) {
|
|
@@ -15365,7 +15366,7 @@ async function createDeviceCodeAuthProvider(config, silentOnly = false) {
|
|
|
15365
15366
|
"No cached credentials available. Run 'powerautomate-mcp --setup' first to authenticate."
|
|
15366
15367
|
);
|
|
15367
15368
|
}
|
|
15368
|
-
if (currentAccount) {
|
|
15369
|
+
if (currentAccount && interactiveAuthCompleted) {
|
|
15369
15370
|
throw new AuthenticationError(
|
|
15370
15371
|
`Silent token acquisition failed for scopes: ${mutableScopes.join(", ")}. Resource may not be registered in the app registration. Re-run --setup to update permissions.`
|
|
15371
15372
|
);
|
|
@@ -15415,6 +15416,7 @@ async function createDeviceCodeAuthProvider(config, silentOnly = false) {
|
|
|
15415
15416
|
currentAccount = result.account;
|
|
15416
15417
|
saveAccount(result.account);
|
|
15417
15418
|
}
|
|
15419
|
+
interactiveAuthCompleted = true;
|
|
15418
15420
|
logger.info({ username: result.account?.username }, "Device code authentication succeeded");
|
|
15419
15421
|
return result;
|
|
15420
15422
|
} catch (err) {
|