spo serviceprincipal set¶
Enable or disable the service principal
Usage¶
m365 spo serviceprincipal set [options]
Alias¶
m365 spo sp set
Options¶
-e, --enabled <enabled>
- Set to
true
to enable the service principal or tofalse
to disable it. Valid values aretrue
,false
. --confirm
- Don't prompt for confirming enabling/disabling the service principal.
-h, --help [help]
- Output usage information. Optionally, specify which section of command's help you want to see. Allowed values are
options
,examples
,remarks
,response
,full
. Default isfull
. --query [query]
- JMESPath query string. See http://jmespath.org/ for more information and examples
-o, --output [output]
- Output type.
json,text,csv,md
. Defaultjson
--verbose
- Runs command with verbose logging
--debug
- Runs command with debug logging
Remarks¶
Important
To use this command you must be a Global administrator.
Using the -e, --enabled
option you can specify whether the service principal should be enabled or disabled. Use true
to enable the service principal and false
to disable it.
Examples¶
Enable the service principal. Will prompt for confirmation
m365 spo serviceprincipal set --enabled true
Disable the service principal. Will prompt for confirmation
m365 spo serviceprincipal set --enabled false
Enable the service principal without prompting for confirmation
m365 spo serviceprincipal set --enabled true --confirm
Response¶
{
"AccountEnabled": true,
"AppId": "48535560-3cc0-442e-a1b4-94c084b3ff59",
"ReplyUrls": [
"https://fluidpreview.office.net/spfxsinglesignon",
"https://dev.fluidpreview.office.net/spfxsinglesignon",
"https://contoso.sharepoint.com/",
"https://contoso.sharepoint.com/_forms/spfxsinglesignon.aspx",
"https://contoso.sharepoint.com/_forms/spfxsinglesignon.aspx?redirect",
"https://contoso-admin.sharepoint.com/_forms/spfxsinglesignon.aspx"
]
}
AccountEnabled: true
AppId : 48535560-3cc0-442e-a1b4-94c084b3ff59
ReplyUrls : ["https://fluidpreview.office.net/spfxsinglesignon","https://dev.fluidpreview.office.net/spfxsinglesignon","https://contoso.sharepoint.com/","https://contoso.sharepoint.com/_forms/spfxsinglesignon.aspx","https://contoso.sharepoint.com/_forms/spfxsinglesignon.aspx?redirect","https://contoso-admin.sharepoint.com/_forms/spfxsinglesignon.aspx"]
AccountEnabled,AppId,ReplyUrls
1,48535560-3cc0-442e-a1b4-94c084b3ff59,"[""https://fluidpreview.office.net/spfxsinglesignon"",""https://dev.fluidpreview.office.net/spfxsinglesignon"",""https://contoso.sharepoint.com/"",""https://contoso.sharepoint.com/_forms/spfxsinglesignon.aspx"",""https://contoso.sharepoint.com/_forms/spfxsinglesignon.aspx?redirect"",""https://contoso-admin.sharepoint.com/_forms/spfxsinglesignon.aspx""]"