microsoft-identity-web
microsoft-identity-web copied to clipboard
The code example on this page is incorrect
Issue Transfer
This issue has been transferred from the Azure SDK for .NET repository, #28231.
Please be aware that @MarcoEnxuto is the author of the original issue and include them for any questions or replies.
Details
Hi, The code provided on this example is not right. First because, you can't obtain an access token only with scopes. You should provide at least an user context. The API doesn't know how to retrieve an authentication object from cache since it doesn't have an identifier. Second, the code snippet is not syntax colored, which makes me believe this is a rough draft. Please fix it accordingly. Thank you.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: 0da47a33-a7c4-b9b1-ea3a-2affbd28f934
- Version Independent ID: 6ef44932-a58a-dffc-8110-aec362c9695c
- Content: ClaimsPrincipalFactory.FromTenantIdAndObjectId(String, String) Method (Microsoft.Identity.Web) - Azure for .NET Developers
- Content Source: xml/Microsoft.Identity.Web/ClaimsPrincipalFactory.xml
- Service: active-directory
- GitHub Login: @rloutlaw
- Microsoft Alias: routlaw