Skip to content

[Feature Request] Provide clear error message in case when MicrosoftIdentityApplicationOptions are not configured #3482

@GeoK

Description

@GeoK

Is your feature request related to a problem? Please describe.
Error message raised if no options are configured is unclear.

Describe the solution you'd like
A clear and error message indicating the source of the issue.

Additional context
If MicrosoftIdentityApplicationOptions are not configured (for a given scheme), one might get an error/exceptions as the one below on GetAccessTokenForUserAsync calls.
Error: System.InvalidOperationException: IDW10503: Cannot determine the cloud Instance

This issue arises when an options object, resolved from an options monitor, is empty (with an empty cloud instance). Since the instance is evaluated first in the specific code path, the error IDW10503: Cannot determine the cloud Instance is triggered.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions