View MigrateTeams.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$csvFile = "C:\temp\teamslist.csv" | |
#List of team object IDs. Header in CSV is ID. | |
$table = Import-Csv $csvFile -Delimiter "," | |
$source = Connect-Tenant -Domain contoso.onmicrosoft.com -Browser | |
$destination = Connect-Tenant -Domain tailspin.onmicrosoft.com -Browser | |
foreach ($row in $table) { | |
$team = Get-Team -id $($row.id) -Tenant $source |
View ChatRights.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$TenantID = "xxxxxx" | |
$LogicAppSeObjectID = "xxxxxxx" | |
$ServicePrincipalId = $LogicAppSeObjectID | |
$GraphResource = Get-MgServicePrincipal -Filter "AppId eq '00000003-0000-0000-c000-000000000000'" | |
$application_role_to_assign_name = "Chat.Read.All" | |
$Permission = $GraphResource.AppRoles | Where-Object {$_.value -in $application_role_to_assign_name} | |
New-MgServicePrincipalAppRoleAssignment -ServicePrincipalId $ServicePrincipalId -PrincipalId $ServicePrincipalId -AppRoleId $Permission.Id -ResourceId $GraphResource.Id |
View RequestBody.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
@{outputs('Compose_ConversationHistoryReversed_2')} | |
}, | |
{ | |
"role": "system", "content": "You are a helpful assistant. Format all your replies in HTML code, but dont mention HTML in the response." | |
} | |
] |
View AzureOpenAIJSON.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"properties": { | |
"choices": { | |
"items": { | |
"properties": { | |
"content_filter_results": { | |
"properties": { | |
"hate": { | |
"properties": { | |
"filtered": { |
View RequestBodyJSON.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"items": { | |
"properties": { | |
"content": { | |
"type": "string" | |
}, | |
"role": { | |
"type": "string" | |
} | |
}, |
View ConversationHistorySubstring2.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
substring(variables('ConversationHistoryReversed'), 1, sub(length(variables('ConversationHistoryReversed')),2)) |
View ConverSationHistorySubString.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
substring(variables('ConversationHistoryReversed'), 1, sub(length(variables('ConversationHistoryReversed')),2)) |
View ConversationHistoryReversedReplace.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
replace(variables('ConversationHistoryReversed'), '<p>', '') |
View ConversationHistoryReversed.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
replace(variables('ConversationHistoryReversed'), '</p>', '') |
View ReverseArrayMessages.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
reverse(variables('ArrayMessages')) |
NewerOlder