{"record":{"id":"8f835641c565b3b1","repo":"larksuite/cli","slug":"s-q-is-ignored-credentials-are-provided-externa","errorCode":null,"errorMessage":"%s=%q is ignored: credentials are provided externally","messagePattern":"(.+?)=%q is ignored: credentials are provided externally","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/doctor/doctor.go","lineNumber":143,"sourceCode":"\t\tvar cfgErr *errs.ConfigError\n\t\tif errors.As(projector.Render(err), &cfgErr) {\n\t\t\thint = cfgErr.Hint\n\t\t}\n\t\tchecks = append(checks, fail(\"app_resolved\", err.Error(), hint))\n\t\treturn finishDoctor(f, checks)\n\t}\n\tchecks = append(checks, pass(\"app_resolved\", fmt.Sprintf(\"app: %s (%s)\", cfg.AppID, cfg.Brand)))\n\n\t// An external credential provider resolves the account without consulting\n\t// profiles at all, so an explicit selector is silently inert. Say so:\n\t// nothing else in the session will. ProfileName is only populated by the\n\t// built-in config-backed provider, which makes it the provider telltale.\n\tif f.Invocation.Profile != \"\" && cfg.ProfileName == \"\" {\n\t\tselector := \"--profile\"\n\t\tif f.Invocation.ProfileSource == core.ProfileFromEnvironment {\n\t\t\tselector = envvars.CliProfile\n\t\t}\n\t\tchecks = append(checks, warn(\"profile_selector\",\n\t\t\tfmt.Sprintf(\"%s=%q is ignored: credentials are provided externally\", selector, f.Invocation.Profile),\n\t\t\tfmt.Sprintf(\"unset %s, or remove the external credential variables to select accounts by profile\", selector)))\n\t}\n\n\tep := core.ResolveEndpoints(cfg.Brand)\n\n\t// ── 3. Identity readiness ──\n\tdiagnostics := identitydiag.FilterRecovery(\n\t\tidentitydiag.Diagnose(opts.Ctx, f, cfg, !opts.Offline),\n\t\tprojector.CanReference,\n\t)\n\tchecks = append(checks,\n\t\tidentityCheck(\"bot_identity\", diagnostics.Bot),\n\t\tidentityCheck(\"user_identity\", diagnostics.User),\n\t)\n\tif diagnostics.Bot.Available || diagnostics.User.Available {\n\t\tchecks = append(checks, pass(\"identity_ready\", \"at least one identity is available\"))\n\t} else {","sourceCodeStart":125,"sourceCodeEnd":161,"githubUrl":"https://github.com/larksuite/cli/blob/7fd6ef3c07182257ce776cdc5a614e122d5bd4b3/cmd/doctor/doctor.go#L125-L161","documentation":"doctor's informational check, not a hard failure: an external credential provider resolved the account, so an explicitly passed profile selector cannot have any effect; doctor says so because nothing else in the session will. Detected via ProfileName, which only the built-in config-backed provider populates.","triggerScenarios":"Thrown at cmd/doctor/doctor.go:143 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Drop the inert selector from the invocation or environment","Switch back to the built-in config-backed provider if profile selection is required"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7fd6ef3c07182257ce776cdc5a614e122d5bd4b3","analyzedAt":"2026-09-04T21:17:44.649Z","contentChangedAt":"2026-09-04T21:17:44.649Z","schemaVersion":2},"datasetVersion":"2026-09-12T02:17:10.037Z"}