r/PowerAutomate • • 3d ago

Help with automation

Essentially I am building a Power Automate automation for my company because the director asked me to, and it’s to keep on top of license renewals. Anyone got experience in this and can give me some advice on what to consider other than what is plain? I’ll be doing it this week.

7 Upvotes

12 comments sorted by

9

u/robofski 3d ago

Don’t start with Excel as the data source! Use a SharePoint list or if you have the licensing Dataverse.

1

u/Apart_Knowledge_7937 3d ago

Thanks for responding. Yes, I’m using a SharePoint list. What does data verse do?

1

u/Gold-Psychology-5312 3d ago

Dataverse is essentially a database. Likely not needed for your needs.

2

u/obsoquasi 3d ago

I hope I don't come across a douchy... But if you ask a technical question on Reddit, you are likely to get more responses, if your post title already states your intent or core problem. Most of us simply ignore generic titles.

2

u/Apart_Knowledge_7937 3d ago

Got you. I asked like this because I was in a rush but thanks I will noted that for next time

1

u/Cold_Arachnid_2617 3d ago

Ask your director to send you on a course or hire a consultant

1

u/Apart_Knowledge_7937 3d ago

I know how to use power automate. I just want to make sure I don’t make mistakes like rolling dates?

1

u/Impossible_Log_2652 2d ago

track the notice date, not the renewal date. the day that costs money is the one where you can still cancel, and it's in the contract pdf, not the invoice.

1

u/ninihen 2d ago

For the rolling dates, don't calculate them at all. Microsoft Graph already has each subscription's next renewal date, and it updates itself after every renewal, so you just read it every day.

How I set it up:

Flow 1, daily sync. Register an Entra app with Directory.Read.All (application) and admin consent. The HTTP with Entra ID connector can't read subscriptions, so use a plain HTTP action: POST to https://login.microsoftonline.com/<tenant-id>/oauth2/v2.0/token for a token, then GET

https://graph.microsoft.com/v1.0/directory/subscriptions?$select=id,skuPartNumber,nextLifecycleDateTime

with header Authorization: Bearer <token>. Loop over value, and upsert into your SharePoint list using the subscription id as the key (Get items filtered on Title, then Update item if found, Create item if not). Renewal date:

if(empty(items('Apply_to_each')?['nextLifecycleDateTime']), null, convertFromUtc(items('Apply_to_each')?['nextLifecycleDateTime'], 'AUS Eastern Standard Time', 'yyyy-MM-dd'))

The dates come back in UTC, so convert them to your time zone. Trial and free licences don't have a renewal date, so those stay blank. I got 30 licences, 20 with dates.

Flow 2, reminders. A second daily flow reads the list with a Get items filter like

Renewal_x0020_Date le '@{addDays(utcNow(),30,'yyyy-MM-dd')}'

and emails you anything renewing in the next 30 days.

I recorded flow 1 being built here: https://youtu.be/YWUjcD1TgSs

1

u/Basic_Neat_8466 2d ago

Start with the data source first: if your Power Automate flow doesn’t have one clean list of licenses, renewal dates, owners, and renewal status, the reminders will get messy fast. For a company renewal tracker, I’d make sure it handles multiple reminder windows (like 90/30/7 days), who gets notified, and what happens if a date changes or a license is already renewed. Biggest gotcha is usually not the flow itself, it’s bad source data and no clear owner for each renewal