Need to Know podcast–Episode 302

In this episode I share some thoughts around AI and the impact that upcoming services like Microsoft 365 Copilot will have. As always, there is plenty of news an updates to share from the Microsoft Cloud. Listen in and let me know your thoughts on this episode.

You can listen directly to this episode at:

https://ciaops.podbean.com/e/episode-302-thoughts-on-ai/

Subscribe via iTunes at:

https://itunes.apple.com/au/podcast/ciaops-need-to-know-podcasts/id406891445?mt=2

The podcast is also available on Stitcher at:

http://www.stitcher.com/podcast/ciaops/need-to-know-podcast?refid=stpr

Don’t forget to give the show a rating as well as send me any feedback or suggestions you may have for the show

This episode was recorded using Microsoft Teams and produced with Camtasia 2023.

Brought to you by www.ciaopspatron.com

Resources

@directorcia

@directorcia@twit.social

Join my shared channel

CIAOPS merch store

Become a CIAOPS Patron

CIAOPS Blog

YouTube edition of this podcast

Responding to targeted mail attacks with Microsoft 365 Defender

Microsoft 365 Lighthouse helps you secure and improve the health of your customer tenants

Introducing the Microsoft 365 Copilot Early Access Program and new capabilities in Copilot 

SharePoint in the AI Era: Introducing Copilot in SharePoint & 10 more innovations for creators

Public Preview: Token Protection for Sign-In Sessions

Get step-by-step guidance for enabling key features in Microsoft Defender

Microsoft 365 Admin Monthly Digest – April 2023

New Microsoft Entra Features Now Available

Automating and Streamlining Vulnerability Management for Your Clients

Microsoft Build

CIAOPS Need to Know Microsoft 365 Webinar – May

laptop-eyes-technology-computer

Join me for the free monthly CIAOPS Need to Know webinar. Along with all the Microsoft Cloud news we’ll be taking a look at Exchange Online protection.

Shortly after registering you should receive an automated email from Microsoft Teams confirming your registration, including all the event details as well as a calendar invite.

You can register for the regular monthly webinar here:

May Webinar Registrations

(If you are having issues with the above link copy and paste – https://bit.ly/n2k2305

The details are:

CIAOPS Need to Know Webinar – May 2023
Friday 26th of May 2023
11.00am – 12.00am Sydney Time

All sessions are recorded and posted to the CIAOPS Academy.

The CIAOPS Need to Know Webinars are free to attend but if you want to receive the recording of the session you need to sign up as a CIAOPS patron which you can do here:

http://www.ciaopspatron.com

or purchase them individually at:

http://www.ciaopsacademy.com/

Also feel free at any stage to email me directly via director@ciaops.com with your webinar topic suggestions.

I’d also appreciate you sharing information about this webinar with anyone you feel may benefit from the session and I look forward to seeing you there.

Adoption with fun and OpenAI

I’ve detailed how to use an API with Power Automate to inject some engaging content automatically into Microsoft Teams.

Adoption with fund and astronomy

Thanks to API’s I want to extend this to use OpenAI and ChatGPT.

What I want to achieve is to ask a question of ChatGPT via an API everyday something like this:

Tell me about 1 May as a list

When I do this interactively at chat.openai.com I see:

image

I now want something like that to appear in Microsoft Teams daily for each day.

You’ll need to head over to OpenAI and get an API key. Here’s how to do that:

How to get an OpenAI API key in just 5 easy steps

I’d also suggest signing up for an OpenAI API subscription if you want to continue using this service. Here’s an idea of the costs.

image

Create a new Scheduled cloud flow. Don’t forget to change the repeat option to 1 day typically.

image

Add the Current Time action.

Add the Convert time zone action to get the time in your location. Set the format string to Month/day pattern (i.e. May 1).

image

Add the HTTP action. Remember, this is a Premium connector. Set teh following options here:

Method = POST

URI = https://api.openai.com/v1/chat/completions

Accept = application/xml

Content-Type = application/json

Authorization = Bearer (your OpenAI API key)

Body:

{
   “model”: “gpt-3.5-turbo”,
   “max_tokens”: 2000,
   “temperature”: 0,
   “messages”: [
     {
       “role”: “user”,
       “content”: “Tell me about @{body(‘Convert_time_zone’)} as a list”
     }
   ]
}

Ensure you double check all these settings as it is easy to make a mistake.

image

Add the Parse JSON action.

I’ve put the JSON schema you need here:

https://github.com/directorcia/general/blob/master/Power%20Platform/OpenAI/JSON-for-GPT

image

Add the Initialize variable action. We need to extract the returned text and format it so it will display in Teams. That means replacing the ‘/n’ string ‘<br>’. That can be done via this expression:

replace(body(‘Parse_JSON’)?[‘choices’][0]?[‘message’]?[‘content’],’/n’,’<br>’)

NOTE: if you copy and paste this expression and receive an error when you try and save it, you’ll most likely have to change the apostrophe from ‘ to ‘. It’s subtle, but you need to use the one to the left of the ENTER key on most keyboards to get it to work in Power Automate.

image

Finally add the Post message in chat or channel action.

image

Ensure you swap to the HTML editor using the </> item in the top right of the message as shown above.

Format the message the way you want to and insert variable created previously as shown.

image

When the Flow executes the output should look something like the above.

Note that GPT isn’t always right! You can also change the AI models if you wish, but remember they have different prices.

Typically, I’d suggest you run this Flow once a day to promote more engagement in your Microsoft Team. Better yet, you can show everyone how you are integrating AI into Teams. Yet another point of engagement in your Microsoft Team and perhaps a way to spark ideas for how you can expand the use of OpenAI in yoru business.

Need to Know podcast–Episode 301

News and updates from the Microsoft Cloud and then a deep dive into Compliance policies in Intune. Have a listen and let me know what you think.

You can listen directly to this episode at:

https://ciaops.podbean.com/e/episode-301-compliance-policies/

Subscribe via iTunes at:

https://itunes.apple.com/au/podcast/ciaops-need-to-know-podcasts/id406891445?mt=2

The podcast is also available on Stitcher at:

http://www.stitcher.com/podcast/ciaops/need-to-know-podcast?refid=stpr

Don’t forget to give the show a rating as well as send me any feedback or suggestions you may have for the show

This episode was recorded using Microsoft Teams and produced with Camtasia 2023.

Brought to you by www.ciaopspatron.com

Resources

@directorcia

@directorcia@twit.social

Join my shared channel

CIAOPS merch store

Become a CIAOPS Patron

CIAOPS Blog

YouTube edition of this podcast

Windows 365 Frontline available in public preview

OneNote: Your Digital Notebook, Reimagined with Copilot

Quick Wins to Strengthen Your Azure AD Security

Automating and Streamlining Vulnerability Management for Your Clients

Phone Link for iOS is now rolling out to all Windows 11 customers

Introducing cloud.microsoft: a unified domain for Microsoft 365 apps and service

Centrally manage multiple Microsoft Sentinel workspaces with workspace manager

Announcing Windows LAPS management through Microsoft Intune

Practice Assessments for Microsoft Certifications

Profanity filtering control for live captions in Teams meetings

Connect Power Automate to Twitter using a Bring Your Own App approach

*** On July 29 the MS docs now say:

The default shared application (Twitter Client application maintained by Microsoft) is no longer available. The connector now supports only one authentication type – Bring your own application. As of June 2023, it requires a paid Enterprise tier application. However, Twitter’s pricing policy might continue to change.

https://learn.microsoft.com/en-us/connectors/twitter/

Twitter or X as it is now, costs are here:

https://developer.twitter.com/en

Enterprise plans will cost >$5,000 per month!


**** On July 19 2023 this configuration starting reporting errors and now no longer seems to work either!

As I have detailed previously:

Power Automate Twitter connector failing

I needed to regenerate the connection to Twitter in my Flows. The following is what worked for me and I hope it can help you as I didn’t find this set out clearly anywhere else. I found that you needed to create all new Twitter connections in your Flows, so remember to record how these are configured before you go and delete anything.

Step 1. Remove any existing Twitter connections in your Data

image

Navigate to Power Automate and select Data and then Connections from the menu on the left. In the top right of this screen you will find a Search box. Into this search box type:

Twitter

image

You should now see a list of all your existing Twitter connections. ALL of these will need to be removed and thus prior, ensure you have recorded what your Twitter actions do in your Flows, because once you delete the connection here you will NOT be able to see what the actions actually did. They will simply show as invalid.

image

The reason you need to delete ALL the Twitter connections you find is the above error:

Failed to create connection for connection id ‘/providers/MicrosoftPowerApps/apps/shared_twitter/connections/shared-twitter-<guid>’. You have reached the maximum number of connections for the ‘twitter’ API.

I personally found I actually had two connectors. Both years apart, but all must be removed as Twitter now only supports one connection for free.

Step 2. Create Twitter API credentials

Microsoft does provide documentation on this here:

Authentication and Bring your own application

and to start with ensure you are logged into your Twitter account in the browser and navigate to:

https://developer.twitter.com/

image

Select Developer Portal in the top right as shown above.

image

Select the option to Sign up for a Free Account towards the bottom of he page.

image

You’ll then need to write a 250 character or more essay and agree to to all the Terms and Conditions before you Submit.

image

Now select the COG under the default project name that has been created for you as shown above.

image

Select the Edit button as shown above.

image

Select the Delete App button at the bottom of the page. I found that the default app did not have the correct permissions and access so I removed it and created a new one with the right settings.

image

Make sure copy the name of the app because you’ll need to enter at the next dialog before pressing Delete app.

image

Back in the projects dashboard select Add an App as shown above.

image

Give the app a meaningful name select Next at the bottom of the page.

image

Copy the API Key and API Key Secret for later use. Make sure you DO SAVE both the API Key and API Key Secret as they’ll be needed back in Power Automate.Also, keep both of these secure as they control access to your Twitter account.

Select App settings at the bottom of the page to continue.

image

Select the Set up button under the User authentication settings towards the bottom of the page as shown above

image

Ensure:

App permissions = Read and write and Direct message

Type of App = Web App, Automated App or Bot

Call Back URI / Redirect URI = https://global.consent.azure-apim.net/redirect

Website URL = https://global.consent.azure-apim.net/redirect

image

Select he option to Save at the bottom of the page. Select Yes when the above dialog appears to confirm.

image

You’ll now see a Client ID and Client Secret as shown above. You won’t need these so simply select Done to continue. You can re-create them if needed later.

image

Select Yes, I saved it to continue.

Step 3. Reconnect Twitter account in Power Automate

Return to Power Automate, Data, Connectors

image

Select New connection from the top of the page as shown above.

image

Search for Twitter using the Search box in the upper right. Then select the Twitter connector to configure it.

image

Ensure:

Authentication type = Bring your own application

Consumer key = API Key

Consumer secret = API Key Secret

image

A browser pop up will now appear asking you to authorize access to your Twitter account. You’ll need to login here with your Twitter account details. Enter you login details and select Authorize app.

You should then see a confirmation appear in this dialog and the browser pop up window will now close.

image

In the list of connections should now appear an entry for Twitter as shown above, and it it should show as Connected.

image

If you now navigate to where the Twitter action is inside your Flows you should see that the existing one is invalid as shown above.

image

Select the ellipse in the top right hand corner and from the menu that appears select Delete. I found I had to minimise the Twitter action first to allow it to be deleted.

You can now create a new Twitter action which will use the new connector and API that was created.

With that all done you should now Save your Flow and test it to ensure it is working as expected.

In summary, you’ll firstly need to check the existing configuration for any Twitter actions you have in a Flow and record these. Next, you’ll need to remove any and all existing Twitter connections in Power Automate. Remember, there maybe more than one. Next, you’ll need to go Developer area in Twitter. There you’ll need to delete the default app that is created and create a new one. When you create a new one you’ll receive credentials you’ll need to save and use back in Power Automate. Once created you’ll need to configure it with a few additional settings. With that complete, you’ll return to Power Automate and create a new Twitter data connection with the credentials obtained. Finally, you’ll need to remove the old Twitter actions from your Flows and create new ones.

As I said, this process worked for me and I hope it does for you.

Power Automate Twitter connector failing

*** My resolution to this here – https://blog.ciaops.com/2023/04/27/connect-power-automate-to-twitter-using-a-bring-your-own-app-approach/

Since the 20th of April 2023 the Power Automate Twitter connector has been failing to authenticate. This means you get an error in your Flow that looks like:

image

When I tried to fix the connector I am greeted by.

Image

There have no doubt been changes in the Twitter API which have caused this.

I’m trying to find an answer from Microsoft on how this will be handled going forward, but as yet I have not heard nothing back. If I find out, I’ll post here again.

ANZAC Day 2023

April 25 is when Australia and New Zealand pause to remember those who sacrificed, now and in the past. It is the anniversary of the very first time that we fought as nations and fought together.

In military terms the whole campaign that gave birth to this day was ill fated and failed to meet its objectives making it a historical failure, but from it was born a sense of nationhood that is probably more what we celebrate today.

How the world has changed from all those years ago in 1915. How the world will continue to change in the years ahead. But let’s hope that the coming together and respect we see here is something that continues beyond just today and into the future. We lives in times that are perhaps more focused on the ‘me’ than the ‘we’ and ANZAC day is a reminder that one of our purposes in life is to serve others.

So today, take a moment to say thanks on those who have served you not just in the armed forces but anywhere. Pay them service by offering to serve others without desire for compensation. These are the things that make a society great. Let what we see today extend beyond the ceremonies and festivities into something that is evident everyday. ANZAC day demonstrates that the spirit is present but we need to manifest on more than just one day a year. Do it for them, if no one else. Commit as many did all those years ago.

Lest We Forget

If you want to learn more about the ANZAC battlefields in northern France, visit my web site – www.anzacsinfrance.com.