dotnet / dotnet/dotnet-api-docs

Default for PrincipalPolicy has changed

Open
#5,157 0 comments 0 reactions 0 assignees View on GitHub
area-System.Runtime Pri3 untriaged
Dominant language
C#
Stars
949
Forks
1.7k
Avg merge
3d 27m
Merged PRs (30d)
49

Description

Currently [PrincipalPolicy](https://github.com/dotnet/dotnet-api-docs/blob/master/xml/System.Security.Principal/PrincipalPolicy.xml) states that the default is _UnauthenticatedPrincipal_. This changed for .NET Core (and .NET 5). It is now _NoPrincipal_ (see [AppDomain.cs](https://github.com/dotnet/runtime/blob/master/src/libraries/System.Private.CoreLib/src/System/AppDomain.cs))

Also the [SetPrincipalPolicy example](https://github.com/dotnet/dotnet-api-docs/blob/dc599c5db9e3464765b4e8c319bc22e525f4eebf/samples/snippets/csharp/VS_Snippets_CLR/ADPrincipal/CS/adprincipal.cs) does not behave the same under .NET core. As the new default for PrincipalPolicy is NoPrincipal it will only show principals for the second and third thread.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.