Yes, you can configure office 365 as relying party in ADFS using SAML protocol. First you will have to make the relying party configuration in ADFS and then you will have to update setting of Office 365 using PowerShell.
You can follow below steps for configuring office 365 as relying party in ADFS,
Add Office 365 as a relying party in ADFS
- Open the ADFS Management Console.
- Click on "Relying Party Trusts" and then click on "Add Relying Party Trust".
- Follow the wizard to add a new relying party trust.
- In the "Select Data Source" step, select "Enter data about the relying party manually".
- In the "Specify Display Name" step, enter a display name for the relying party.
- In the "Choose Profile" step, select "AD FS profile".
- In the "Configure Certificate" step, select the certificate that you want to use for signing and encrypting SAML tokens.
- In the "Configure URL" step, enter the URL of the Office 365 federation metadata file: https://login.microsoftonline.com/<your_tenant_name>/FederationMetadata/2007-06/FederationMetadata.xml
- In the "Configure Identifiers" step, enter the following identifier: urn:federation:MicrosoftOnline
- In the "Choose Access Control Policy" step, select "Permit everyone".
- In the "Ready to Add Trust" step, review your settings and click "Finish".
Configure Office 365 as a relying party in ADFS
- Open the ADFS Management Console.
- Click on "Relying Party Trusts" and then select the relying party that you just added.
- Click on "Edit Claim Rules".
- Click on "Add Rule".
- Select "Send LDAP Attributes as Claims" and click "Next".
- Enter a name for the claim rule and select the LDAP attribute that you want to use as the claim value.
- Click "Finish" to create the claim rule.
Configure settings on office 365 using PowerShell
- Open Windows PowerShell as administrator from any of the Windows device.
- Run the Install-Module MSOnline command.
- If you're prompted to install the NuGet provider, type Y and press Enter.
- If you're prompted to install the module from PSGallery, type Y and press Enter.
- Once module is installed you can run below commands,
- Connect-MsolService (enter global administrator credentials of you Azure AD)
- You will have to run command "Set-MsolDomainAuthentication" to configure the same. There are many parameters which is added to this command. You can get these parameters from below article, https://learn.microsoft.com/en-us/powershell/module/msonline/set-msoldomainauthentication?view=azureadps-1.0
- And for the parameters values you can get them from ADFS metadata.
Let me know if you have any further questions. Please "Accept the answer" if the information helped you. This will help us and others in the community as well.