Debian Codegraph @

doc/sources/admin/applications/office365.rst

raw
1 Office 365
2 ==========
3
4 |image0|
5
6 Presentation
7 ------------
8
9 `Office 365 <https://en.wikipedia.org/wiki/Office_365>`__ provides
10 online access to Microsoft products like Office, Outlook or Yammer.
11 Authentication is done on https://login.microsoftonline.com/ and can be
12 forwarded to an SAML Identity Provider.
13
14 Configuration
15 -------------
16
17 .. _office-365-1:
18
19 Office 365
20 ~~~~~~~~~~
21
22 You first need to install AzureAD PowerShell to be able to run
23 administrative commands.
24
25 Then run this script:
26
27 .. code-block:: bash
28
29 $dom = "mycompany.com"
30 $brand = "My Company"
31 $url = "https://auth.example.com/saml/singleSignOn"
32 $uri = "https://auth.example.com/saml/metadata"
33 $logouturl = "https://auth.example.com/?logout=1"
34 $cert = "xxxxxxxxxxxxxxxxxxx"
35
36 Set-MsolDomainAuthentication –DomainName $dom -FederationBrandName $brand -Authentication Federated -PassiveLogOnUri $url -SigningCertificate $cert -IssuerUri $uri -LogOffUri $logouturl -PreferredAuthenticationProtocol SAMLP
37
38 Where parameters are:
39
40 - dom: Your Office 365 domain
41 - brand: Simple label
42 - url: The SAML SSO endpoint
43 - uri: The SAML metadata endpoint
44 - logouturl: Logout URL
45 - cert: The SAML certificate containing the signature public key
46
47 If you have several Office365 domains, you can't use the same URLs for
48 each domains. To be able to have a single SAML IDP for several domains,
49 you must add the 'domain' GET parameters at the end of SSO endpoint and
50 metadata URLs, for example:
51
52 - domain 'mycompany.com':
53
54 - url: https://auth.example.com/saml/singleSignOn?domain=mycompany
55 - uri: https://auth.example.com/saml/metadata?domain=mycompany
56
57 - domain 'myfirm.com':
58
59 - url: https://auth.example.com/saml/singleSignOn?domain=myfirm
60 - uri: https://auth.example.com/saml/metadata?domain=myfirm
61
62 LemonLDAP::NG
63 ~~~~~~~~~~~~~
64
65 Create a new SAML Service Provider and import Microsoft metadata from
66 https://nexus.microsoftonline-p.com/federationmetadata/saml20/federationmetadata.xml
67
68 Set the NameID value to persistent format.
69
70 You must use the base64 value of `mS-DS-ConsistencyGuid` attribute. (also known as immutableID)
71
72 Note that `-` in variable names may lead to problems. You shoud declare a LDAP mapping immutableid <-> mS-DS-ConsistencyGuid, and then declare a macro : `$immutableb64 = encode_base64( "$immutableid", "" )`
73
74
75 Create a SAML attribute named IDPEmail which contains the user principal
76 name (UPN).
77
78 .. |image0| image:: /applications/logo_office_365.png
79 :class: align-center
80