# Identity Provider Login with API

**URL:** https://hub.mender.io/t/identity-provider-login-with-api/5659
**Category:** General Discussions
**Created:** [March 8, 2023, 3:13pm UTC](https://hub.mender.io/t/identity-provider-login-with-api/5659 "2023-03-08T15:13:13Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![dburns](https://avatars.discourse-cdn.com/v4/letter/d/a88e57/32.png) [@dburns](https://hub.mender.io/u/dburns)
#### Post date: [March 8, 2023, 3:13pm UTC](https://hub.mender.io/t/identity-provider-login-with-api/5659/1 "2023-03-08T15:13:13Z")

</div>

I’m working on an application that uses the API for some operations, and I’ve been able to get along with using my PAT just fine, but the token is very short-lived, and I’d like to obtain the token programatically rather than through the UI. I use Google as my Identity provider, and the docs suggest passing in the UUID for this provider for the redirection: [Mender API docs](https://docs.mender.io/api/#management-api-user-administration-and-authentication-login-via-given-identity-provider)

How to I obtain the UUID needed to get this to work?

---

<div class="post-metadata">

### Author: ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)
#### Post date: [March 10, 2023, 8:46am UTC](https://hub.mender.io/t/identity-provider-login-with-api/5659/2 "2023-03-10T08:46:44Z")

</div>

Hi @dburns,

Sorry, I can’t properly follow. The [PATs](https://docs.mender.io/server-integration/using-the-apis#personal-access-tokens) are definitely not short-lived, and meant exactly for that use case. Is your application distributed or scaling out over so many devices that it needs to be automatically created?

Greetz,  
Josef

---

<div class="post-metadata">

### Author: ![dburns](https://avatars.discourse-cdn.com/v4/letter/d/a88e57/32.png) [@dburns](https://hub.mender.io/u/dburns)
#### Post date: [March 10, 2023, 2:20pm UTC](https://hub.mender.io/t/identity-provider-login-with-api/5659/3 "2023-03-10T14:20:40Z")

</div>

That’s what I saw in the Docs, but the only token I have under “My Profile” is my session token, which expires when the page times out. I can use that easily enough for testing things out for a few minutes, but it won’t work for my application.

I’m building a UI for use internally, and ideally users would still use their own profile (signing in via Google) for making these calls.

---

<div class="post-metadata">

### Author: ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)
#### Post date: [March 10, 2023, 6:10pm UTC](https://hub.mender.io/t/identity-provider-login-with-api/5659/4 "2023-03-10T18:10:29Z")

</div>

Hi @dburns,

The paragraph following _Session token_ is called _Personal access token management_, and allows you to create a number of long-lived tokens for exactly the use case that you described. If it is not there, then chances are that you are running an outdated version of the backend.

Greetz,  
Josef

---

<div class="post-metadata">

### Author: ![dburns](https://avatars.discourse-cdn.com/v4/letter/d/a88e57/32.png) [@dburns](https://hub.mender.io/u/dburns)
#### Post date: [March 10, 2023, 6:31pm UTC](https://hub.mender.io/t/identity-provider-login-with-api/5659/5 "2023-03-10T18:31:39Z")

</div>

I’m currently on a Trial plan, is it possible that I don’t have access to that due to being on a trial?

 ![MenderProfile](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/2X/b/baba4d0832fb72a0542cb850f30935ae73866b55.png)

---

<div class="post-metadata">

### Author: ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)
#### Post date: [March 13, 2023, 2:23pm UTC](https://hub.mender.io/t/identity-provider-login-with-api/5659/6 "2023-03-13T14:23:39Z")

</div>

Thats really strange. I just created a test account in trial state, and it looks like this

 ![Screenshot 2023-03-13 at 15.19.41](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/2X/b/b46a6ce74cab4f80aa7dd1122f026544fb3cee44.png)

I’ll ping people to see what might be going on here.

---

<div class="post-metadata">

### Author: ![dburns](https://avatars.discourse-cdn.com/v4/letter/d/a88e57/32.png) [@dburns](https://hub.mender.io/u/dburns)
#### Post date: [March 20, 2023, 2:22pm UTC](https://hub.mender.io/t/identity-provider-login-with-api/5659/7 "2023-03-20T14:22:41Z")

</div>

Any movement on this? Could it be because I created my account using Google?

---

<div class="post-metadata">

### Author: ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)
#### Post date: [March 21, 2023, 8:48am UTC](https://hub.mender.io/t/identity-provider-login-with-api/5659/8 "2023-03-21T08:48:37Z")

</div>

Hi @dburns

Sorry, I was busy travelling last week. Yes, this indeed the feedback that I got from the developers. PATs are not available for SSO-based accounts. The workaround would be to add a username/password based user to your account (you can do so under `User Management`), and that one can have PATs then.

Greetz,  
Josef

---

<div class="post-metadata">

### Author: ![dburns](https://avatars.discourse-cdn.com/v4/letter/d/a88e57/32.png) [@dburns](https://hub.mender.io/u/dburns)
#### Post date: [March 30, 2023, 1:35pm UTC](https://hub.mender.io/t/identity-provider-login-with-api/5659/9 "2023-03-30T13:35:40Z")

</div>

I attempted to do that with my existing email, but it looks like I can’t register the same email twice. Also, my organization has SSO enabled company-wide, so for users to be able to access this application we will need this functionality. Is there a plan for this to be implemented?

---

<div class="post-metadata">

### Author: ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)
#### Post date: [April 5, 2023, 12:21pm UTC](https://hub.mender.io/t/identity-provider-login-with-api/5659/10 "2023-04-05T12:21:19Z")

</div>

Hi @dburns,

I’m not aware of any change plans here. If your SSO provider is Google, then a simple trick would be to add a `+something` suffix. Like `my.name+menderapi@gmail.com`, which will be delivered to your standard inbox.

Greetz,  
Josef
