web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / POST HTTP Action - Day...
Power Automate
Answered

POST HTTP Action - Dayforce API - error invalid_client

(1) ShareShare
ReportReport
Posted on by 19

Hi, 

 

I'm wondering if someone can help me out as I've never experienced this before. I'm working with the Ceridian Dayforce API and am using a custom connector. I am trying to retrieve the bearer token and am receiving an {"error":"invalid_client"} on the HTTP action. When I follow the API requirements with postman I'm able to retrieve the token. When I use the HTTP action I get this error. 

screenshot2.jpg

 

screenshot.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Dayforce API Token-Based Auth documentation

Request a token

An authentication token can be retrieved with an API call to Dayforce Identity servers.

The call is a POST call on the following URLs:

 

You will need to join the following form body to your call:

  • Grant_type: value is always: password
  • CompanyId: Client namespace, used to connect to Dayforce UI or APIs
  • Username: Name of the Dayforce user dedicated to Web service calls
  • Password: Password of the specified user
  • Client_Id: Scope of the token, the value is always: Dayforce.HCMAnywhere.Client

The content type of this body should be application/x-www-form-urlencoded.
 

Dayforce Identity server will check the credentials provided in the request and respond with JSON Web Token containing the token, its scope and its validity duration (in seconds).

 

 

Categories:
I have the same question (0)
  • Verified answer
    abm abm Profile Picture
    32,985 Most Valuable Professional on at

    Hi @AnalogIT 

     

    Tried now and I got this working

     

    By looking the documentation you don't need to pass the body in JSON format. Copy the below in your body and replace the relevant values.

     

    grant_type=xxxxx&companyId=xxxx&username=xxxxx&password=xxxxx&client_id=Dayforce.HCMAnywhere.Client

     

    See below my unit test result:

     

    image.png

  • Andrew - Davinci Technology Solutions Profile Picture
    19 on at

    Thank you very much @abm . That did the trick!

     

    Do you know if it is possible, now that I have the bearer token to use that in a custom connector to authenticate? I realized after I went down this path that the custom connector uses built in authentication. (API, basic etc). 

     

    I'm going to try no authentication on the custom connector and use header options to be able to place the bearer token in the header when the connecter is used in the flow. I have been using the username and password but I'd like to implement the renewable token as it would be more secure. 

     

    Any insight would be much appreciated. 

  • Andrew - Davinci Technology Solutions Profile Picture
    19 on at

    @abm - It looks like using the Authentication header information is not allowed in a custom connector. 
    screenshot3.jpg

     

    custom API connection using JWT that expires - Power Platform Community (microsoft.com)

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Did you actually create a custom connector or are you just using raw http calls to Dayforce?

     

    I ask because I am trying to create a custom connector myself for Dayforce but cannot see how to specify the authentication in the connector

     

    I don't see how you can create a grant_type=password at all

  • deepakt Profile Picture
    2 on at

    Hi,

    I have queries as per below,

    grant_type=xxxxx&companyId=xxxx&username=xxxxx&password=xxxxx&client_id=Dayforce.HCMAnywhere.Client

     

    from the above url,

    What is company id ? is this company name like xyz.com?

    what is Username value ?  is this  email id like xyz@abc.com?

    what is the Password value ? is this login password for that user?

     

    Please suggest.

     

    Thanks

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 612

#2
Valantis Profile Picture

Valantis 344

#3
11manish Profile Picture

11manish 326

Last 30 days Overall leaderboard