instructure/canvas-lms · error · Lti::IMS::AdvantageErrors::InvalidResourceLinkIdFilter
Requested assignment not configured for external tool…
Error message
Requested assignment not configured for external tool launches
What it means
Guard in MembershipsProvider#validate_tool!: the rlid resolves to a resource link but the associated assignment is not an external-tool assignment (not configured for LTI launches), so the NRPS request is rejected with InvalidResourceLinkIdFilter; the api_message carries this user-facing text.
Solutions
- Configure the assignment as an external-tool (LTI) assignment with a line item/resource link
- Request memberships for a resource link that belongs to an LTI assignment or module item
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at app/controllers/lti/ims/providers/memberships_provider.rb:170 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of instructure/canvas-lms@1c9f0bb801 (2026-09-15).
Data as JSON: /api/errors/a85ebcb20e993fce.
Report an issue: GitHub.
Appendix: source
Thrown at app/controllers/lti/ims/providers/memberships_provider.rb:170
return nil unless rlid?
return @assignment if defined?(@assignment)
@assignment = Assignment.active.for_course(course.id)
.joins(line_items: :resource_link)
.where(lti_resource_links: { id: resource_link&.id })
.distinct
.take
end
def assignment?
assignment&.present?
end
def validate_tool!
raise Lti::IMS::AdvantageErrors::InvalidResourceLinkIdFilter unless resource_link
if assignment? && !assignment.external_tool?
raise Lti::IMS::AdvantageErrors::InvalidResourceLinkIdFilter.new(
"Assignment (id: #{assignment&.id}, rlid: #{rlid}) is not configured for submissions via external tool",
api_message: "Requested assignment not configured for external tool launches"
)
end
tool_tag = assignment&.external_tool_tag || content_tag
if tool_tag.blank?
raise Lti::IMS::AdvantageErrors::InvalidResourceLinkIdFilter.new(
"ContentTag (rlid: #{rlid}) not found",
api_message: "Requested ResourceLink was not found"
)
end
if tool_tag.content_type != "ContextExternalTool"
raise Lti::IMS::AdvantageErrors::InvalidResourceLinkIdFilter.new(
"ResourceLink (rlid: #{rlid}) needs content tag type 'ContextExternalTool' but found #{tool_tag.content_type}",
api_message: "Requested ResourceLink has an unexpected content type"
)
endView on GitHub (pinned to 1c9f0bb801)