-
Notifications
You must be signed in to change notification settings - Fork 63
/
office.authoptions.yml
136 lines (132 loc) · 5.73 KB
/
office.authoptions.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
### YamlMime:TSType
name: Office.AuthOptions
uid: 'office!Office.AuthOptions:interface'
package: office!
fullName: Office.AuthOptions
summary: >-
Provides options for the user experience when Office obtains an access token to the add-in from AAD v. 2.0 with the
`getAccessToken` method.
remarks: ''
isPreview: false
isDeprecated: false
type: interface
properties:
- name: allowConsentPrompt
uid: 'office!Office.AuthOptions#allowConsentPrompt:member'
package: office!
fullName: allowConsentPrompt
summary: >-
Allows Office to get an access token silently or through interactive consent, if one is required. Default value is
`false`<!-- -->. If set to `false`<!-- -->, Office will silently try to get an access token. If it fails to do so,
Office will return a descriptive error. If set to `true`<!-- -->, Office will show an interactive consent UI after
it fails to silently get an access token. The prompt will only allow consent to the AAD profile scope, not to any
Microsoft Graph scopes.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'allowConsentPrompt?: boolean;'
return:
type: boolean
- name: allowSignInPrompt
uid: 'office!Office.AuthOptions#allowSignInPrompt:member'
package: office!
fullName: allowSignInPrompt
summary: >-
Allows Office to get an access token silently provided consent is present or show interactive UI to sign in the
user. Default value is `false`<!-- -->. If set to `false`<!-- -->, Office will silently try to get an access
token. If it fails to do so, Office will return a descriptive error. If set to `true`<!-- -->, Office will show an
interactive sign-in UI after it fails to silently get an access token.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'allowSignInPrompt?: boolean;'
return:
type: boolean
- name: asyncContext
uid: 'office!Office.AuthOptions#asyncContext:member'
package: office!
fullName: asyncContext
summary: >-
A user-defined item of any type that is returned, unchanged, in the `asyncContext` property of the `AsyncResult`
object that is passed to a callback.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'asyncContext?: any;'
return:
type: any
- name: authChallenge
uid: 'office!Office.AuthOptions#authChallenge:member'
package: office!
fullName: authChallenge
summary: >-
Causes Office to prompt the user to provide the additional factor when the tenancy being targeted by Microsoft
Graph requires multifactor authentication. The string value identifies the type of additional factor that is
required. In most cases, you won't know at development time whether the user's tenant requires an additional
factor or what the string should be. So this option would be used in a "second try" call of `getAccessToken` after
Microsoft Graph has sent an error requesting the additional factor and containing the string that should be used
with the `authChallenge` option.
remarks: ''
isPreview: false
isDeprecated: false
syntax:
content: 'authChallenge?: string;'
return:
type: string
- name: forceAddAccount
uid: 'office!Office.AuthOptions#forceAddAccount:member'
package: office!
fullName: forceAddAccount
summary: >-
Prompts the user to add their Office account (or to switch to it, if it is already added). Default value is
`false`<!-- -->.
**Warning**: `forceAddAccount` has been deprecated. Use `allowSignInPrompt` instead.
remarks: ''
isPreview: false
isDeprecated: true
customDeprecatedMessage: Use `allowSignInPrompt` instead.
syntax:
content: 'forceAddAccount?: boolean;'
return:
type: boolean
- name: forceConsent
uid: 'office!Office.AuthOptions#forceConsent:member'
package: office!
fullName: forceConsent
summary: >-
Causes Office to display the add-in consent experience. Useful if the add-in's Azure permissions have changed or
if the user's consent has been revoked. Default value is `false`<!-- -->.
**Warning**: `forceConsent` has been deprecated. Use `allowConsentPrompt` instead.
remarks: ''
isPreview: false
isDeprecated: true
customDeprecatedMessage: Use `allowConsentPrompt` instead.
syntax:
content: 'forceConsent?: boolean;'
return:
type: boolean
- name: forMSGraphAccess
uid: 'office!Office.AuthOptions#forMSGraphAccess:member'
package: office!
fullName: forMSGraphAccess
summary: >-
Causes Office to return a descriptive error when the add-in wants to access Microsoft Graph and the user/admin has
not granted consent to Graph scopes. Default value is `false`<!-- -->. Office only supports consent to Graph
scopes when the add-in has been deployed by a tenant admin. Setting this option to `true` will cause Office to
inform your add-in beforehand (by returning a descriptive error) if Graph access will fail.
remarks: >-
**Note**: If you're developing an Outlook add-in that uses single sign-on (SSO), comment out the
`forMSGraphAccess` option before sideloading the add-in for testing. Otherwise, you'll receive [error
13012](https://learn.microsoft.com/office/dev/add-ins/develop/troubleshoot-sso-in-office-add-ins#13012)<!-- -->.
For additional guidance, see [Details on SSO with an Outlook
add-in](https://learn.microsoft.com/office/dev/add-ins/develop/authorize-to-microsoft-graph#details-on-sso-with-an-outlook-add-in)<!--
-->.
isPreview: false
isDeprecated: false
syntax:
content: 'forMSGraphAccess?: boolean;'
return:
type: boolean