4
4
5
5
using Azure . Core ;
6
6
using Microsoft . Kiota . Abstractions . Authentication ;
7
+ using System ;
7
8
using System . Linq ;
8
9
9
10
namespace Microsoft . Graph . Authentication ;
@@ -12,10 +13,17 @@ namespace Microsoft.Graph.Authentication;
12
13
/// An overload of the Access Token Provider that has the defaults for Microsoft Graph.
13
14
/// </summary>
14
15
public class AzureIdentityAccessTokenProvider : Microsoft . Kiota . Authentication . Azure . AzureIdentityAccessTokenProvider {
15
- /// <inheritdoc/>
16
- public AzureIdentityAccessTokenProvider ( TokenCredential credential , string [ ] allowedHosts = null , Microsoft . Kiota . Authentication . Azure . ObservabilityOptions observabilityOptions = null , params string [ ] scopes )
17
- : base ( credential , allowedHosts , observabilityOptions , scopes ) {
18
- if ( ! allowedHosts ? . Any ( ) ?? true )
16
+ /// <inheritdoc/>
17
+ public AzureIdentityAccessTokenProvider ( TokenCredential credential , string [ ] allowedHosts = null , Microsoft . Kiota . Authentication . Azure . ObservabilityOptions observabilityOptions = null , bool isCaeEnabled = true , params string [ ] scopes )
18
+ : base ( credential , allowedHosts , observabilityOptions , isCaeEnabled , scopes ) {
19
+ if ( ! allowedHosts ? . Any ( ) ?? true )
19
20
AllowedHostsValidator = new AllowedHostsValidator ( new string [ ] { "graph.microsoft.com" , "graph.microsoft.us" , "dod-graph.microsoft.us" , "graph.microsoft.de" , "microsoftgraph.chinacloudapi.cn" , "canary.graph.microsoft.com" , "graph.microsoft-ppe.com" } ) ;
20
21
}
22
+
23
+ /// <inheritdoc/>
24
+ [ Obsolete ( "This constructor is obsolete and will be removed in a future version. Use the constructor that takes an isCaeEnabled parameter instead." ) ]
25
+ public AzureIdentityAccessTokenProvider ( TokenCredential credential , string [ ] allowedHosts = null , Microsoft . Kiota . Authentication . Azure . ObservabilityOptions observabilityOptions = null , params string [ ] scopes )
26
+ : this ( credential , allowedHosts , observabilityOptions , true , scopes )
27
+ {
28
+ }
21
29
}
0 commit comments